mirror of
https://github.com/transmission/transmission
synced 2024-12-30 19:46:56 +00:00
fix: macOS watchdirs (#5058)
This commit is contained in:
parent
47fd150bab
commit
8a374a3310
1 changed files with 10 additions and 1 deletions
|
@ -3580,10 +3580,19 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
|
|||
continue;
|
||||
}
|
||||
|
||||
NSDictionary<NSFileAttributeKey, id>* fileAttributes = [NSFileManager.defaultManager attributesOfItemAtPath:fullFile
|
||||
error:nil];
|
||||
if (fileAttributes.fileSize == 0)
|
||||
{
|
||||
// Workaround for Firefox downloads happening in two steps: first time being an empty file
|
||||
[self.fAutoImportedNames removeObject:file];
|
||||
continue;
|
||||
}
|
||||
|
||||
auto metainfo = tr_torrent_metainfo{};
|
||||
if (!metainfo.parseTorrentFile(fullFile.UTF8String))
|
||||
{
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
[self openFiles:@[ fullFile ] addType:ADD_AUTO forcePath:nil];
|
||||
|
|
Loading…
Reference in a new issue