(1.1x) a little extra safety when determining space needed to download
This commit is contained in:
parent
f4e40ec390
commit
e66074c1a6
|
@ -568,7 +568,13 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
NSDictionary * fileAttributes = onLeopard ? [fileManager attributesOfItemAtPath: path error: NULL]
|
||||
: [fileManager fileAttributesAtPath: path traverseLink: NO];
|
||||
if (fileAttributes)
|
||||
neededSpace -= [[fileAttributes objectForKey: NSFileSize] unsignedLongLongValue];
|
||||
{
|
||||
unsigned long long fileSize = [[fileAttributes objectForKey: NSFileSize] unsignedLongLongValue];
|
||||
if (fileSize < neededSpace)
|
||||
neededSpace -= fileSize;
|
||||
else
|
||||
neededSpace = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -497,6 +497,7 @@
|
|||
[fErrorImage drawInRect: errorRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
|
||||
}
|
||||
|
||||
#warning alter
|
||||
//text color
|
||||
NSColor * titleColor, * statusColor;
|
||||
if ([NSApp isOnLeopardOrBetter] ? [self backgroundStyle] == NSBackgroundStyleDark : [self isHighlighted]
|
||||
|
|
Loading…
Reference in New Issue