Changeset 951 for trunk/macosx/Torrent.m
- Timestamp:
- Sep 28, 2006, 5:17:07 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Torrent.m
r950 r951 420 420 return YES; 421 421 422 NSDictionary * fsAttributes = [[NSFileManager defaultManager] fileSystemAttributesAtPath: [self dataLocation]]; 422 NSString * location = [self dataLocation], 423 * volume = [[[NSFileManager defaultManager] componentsToDisplayForPath: location] objectAtIndex: 0]; 424 NSDictionary * fsAttributes = [[NSFileManager defaultManager] fileSystemAttributesAtPath: location]; 423 425 uint64_t remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] unsignedLongLongValue], 424 426 torrentRemaining = [self size] * (uint64_t)(1.0 - [self progress]); 425 427 426 NSLog(@"Volume: %@", [[[NSFileManager defaultManager] componentsToDisplayForPath: [self dataLocation]] objectAtIndex: 0]);428 NSLog(@"Volume: %@", volume); 427 429 NSLog(@"Remaining disk space: %qu (%@)", remainingSpace, [NSString stringForFileSize: remainingSpace]); 428 430 NSLog(@"Torrent remaining size: %qu (%@)", torrentRemaining, [NSString stringForFileSize: torrentRemaining]); 429 431 430 if ( remainingSpace <= torrentRemaining)432 if (volume && remainingSpace <= torrentRemaining) 431 433 { 432 434 NSAlert * alert = [[NSAlert alloc] init]; … … 434 436 [self name]]]; 435 437 [alert setInformativeText: [NSString stringWithFormat: 436 @"The transfer has been paused. Clear up space on %@ to continue.", 437 [[[NSFileManager defaultManager] componentsToDisplayForPath: [self dataLocation]] objectAtIndex: 0]]]; 438 @"The transfer has been paused. Clear up space on %@ to continue.", volume]]; 438 439 [alert runModal]; 439 440
Note: See TracChangeset
for help on using the changeset viewer.