From 8079b10845e2e83399575b2bf65fb0d73c2c42da Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Thu, 28 Sep 2006 04:06:38 +0000 Subject: [PATCH] Re-add logs and try using different conversion. --- macosx/Torrent.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index f11445adf..b4c7dce12 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -420,8 +420,11 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 return YES; NSDictionary * fsAttributes = [[NSFileManager defaultManager] fileSystemAttributesAtPath: [self dataLocation]]; - float remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] floatValue], - torrentRemaining = (float)[self size] * (1.0 - [self progress]); + uint64_t remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] unsignedLongLongValue], + torrentRemaining = [self size] * (uint64_t)(1.0 - [self progress]); + + NSLog(@"Remaining disk space: %qu", remainingSpace); + NSLog(@"Torrent remaining size: %qu", torrentRemaining); if (remainingSpace - torrentRemaining <= 10240.0) { @@ -435,7 +438,6 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 return NO; } - return YES; }