Changeset 9401


Ignore:
Timestamp:
Oct 25, 2009, 1:42:22 PM (13 years ago)
Author:
livings124
Message:

restore the check for remaining disk space

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r9400 r9401  
    489489        return YES;
    490490   
    491     #warning fix
    492     return YES;
    493     NSFileManager * fileManager = [NSFileManager defaultManager];
    494     NSString * downloadFolder = [self downloadFolder];
    495    
    496     NSString * volumeName;
    497     if ((volumeName = [[fileManager componentsToDisplayForPath: downloadFolder] objectAtIndex: 0]))
    498     {
    499         NSDictionary * systemAttributes = [fileManager attributesOfFileSystemForPath: downloadFolder error: NULL];
     491    NSString * downloadFolder = [self currentDirectory], * volumeName;
     492    if (downloadFolder && (volumeName = [[[NSFileManager defaultManager] componentsToDisplayForPath: downloadFolder] objectAtIndex: 0]))
     493    {
     494        NSDictionary * systemAttributes = [[NSFileManager defaultManager] attributesOfFileSystemForPath: downloadFolder error: NULL];
    500495        uint64_t remainingSpace = [[systemAttributes objectForKey: NSFileSystemFreeSize] unsignedLongLongValue];
    501496       
Note: See TracChangeset for help on using the changeset viewer.