hopefully a bit better...now just figure out a way to get the progress before starting a torrent

This commit is contained in:
Mitchell Livingston 2006-09-28 17:38:10 +00:00
parent ae064b1ba7
commit f6b456b7c3
1 changed files with 2 additions and 1 deletions

View File

@ -423,10 +423,11 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
* volume = [[[NSFileManager defaultManager] componentsToDisplayForPath: location] objectAtIndex: 0];
NSDictionary * fsAttributes = [[NSFileManager defaultManager] fileSystemAttributesAtPath: location];
uint64_t remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] unsignedLongLongValue],
torrentRemaining = [self size] * (uint64_t)(1.0 - [self progress]);
torrentRemaining = [self size] - (uint64_t)[self downloadedValid];
NSLog(@"Volume: %@", volume);
NSLog(@"Remaining disk space: %qu (%@)", remainingSpace, [NSString stringForFileSize: remainingSpace]);
NSLog(@"Torrent total size: %qu (%@)", [self size], [NSString stringForFileSize: [self size]]);
NSLog(@"Torrent remaining size: %qu (%@)", torrentRemaining, [NSString stringForFileSize: torrentRemaining]);
if (volume && remainingSpace <= torrentRemaining)