mirror of
https://github.com/transmission/transmission
synced 2025-02-02 12:32:54 +00:00
Remove some logging and add the volume name to space warning.
This commit is contained in:
parent
9881f7b6ef
commit
13b3da143e
1 changed files with 4 additions and 6 deletions
|
@ -89,7 +89,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
|
||||
NSString * paused;
|
||||
if (!(paused = [history objectForKey: @"Paused"]) || [paused isEqualToString: @"NO"])
|
||||
tr_torrentStart(fHandle);
|
||||
[self startTransfer];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -423,16 +423,14 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
float remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] floatValue],
|
||||
torrentRemaining = (float)[self size] * (1.0 - [self progress]);
|
||||
|
||||
NSLog(@"Remaining disk space: %f", remainingSpace);
|
||||
NSLog(@"Torrent remaining size: %f", torrentRemaining);
|
||||
|
||||
if (remainingSpace - torrentRemaining <= 10240.0)
|
||||
{
|
||||
NSAlert * alert = [[NSAlert alloc] init];
|
||||
[alert setMessageText: [NSString stringWithFormat: @"Not enough remaining disk space to download \"%@\" completely.",
|
||||
[self name]]];
|
||||
[alert setInformativeText: @"The transfer has been paused. Clear up space on your disk to continue."];
|
||||
|
||||
[alert setInformativeText: [NSString stringWithFormat:
|
||||
@"The transfer has been paused. Clear up space on %@ to continue.",
|
||||
[[[NSFileManager defaultManager] componentsToDisplayForPath: [self dataLocation]] objectAtIndex: 0]]];
|
||||
[alert runModal];
|
||||
|
||||
return NO;
|
||||
|
|
Loading…
Reference in a new issue