Changeset 946


Ignore:
Timestamp:
Sep 28, 2006, 4:06:38 AM (15 years ago)
Author:
livings124
Message:

Re-add logs and try using different conversion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r941 r946  
    421421   
    422422    NSDictionary * fsAttributes = [[NSFileManager defaultManager] fileSystemAttributesAtPath: [self dataLocation]];
    423     float remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] floatValue],
    424             torrentRemaining = (float)[self size] * (1.0 - [self progress]);
     423    uint64_t remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] unsignedLongLongValue],
     424            torrentRemaining = [self size] * (uint64_t)(1.0 - [self progress]);
     425   
     426    NSLog(@"Remaining disk space: %qu", remainingSpace);
     427    NSLog(@"Torrent remaining size: %qu", torrentRemaining);
    425428   
    426429    if (remainingSpace - torrentRemaining <= 10240.0)
     
    436439        return NO;
    437440    }
    438    
    439441    return YES;
    440442}
Note: See TracChangeset for help on using the changeset viewer.