Remove some logging and add the volume name to space warning.
This commit is contained in:
parent
9881f7b6ef
commit
13b3da143e
|
@ -89,7 +89,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
|
|
||||||
NSString * paused;
|
NSString * paused;
|
||||||
if (!(paused = [history objectForKey: @"Paused"]) || [paused isEqualToString: @"NO"])
|
if (!(paused = [history objectForKey: @"Paused"]) || [paused isEqualToString: @"NO"])
|
||||||
tr_torrentStart(fHandle);
|
[self startTransfer];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -423,16 +423,14 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
float remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] floatValue],
|
float remainingSpace = [[fsAttributes objectForKey: NSFileSystemFreeSize] floatValue],
|
||||||
torrentRemaining = (float)[self size] * (1.0 - [self progress]);
|
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)
|
if (remainingSpace - torrentRemaining <= 10240.0)
|
||||||
{
|
{
|
||||||
NSAlert * alert = [[NSAlert alloc] init];
|
NSAlert * alert = [[NSAlert alloc] init];
|
||||||
[alert setMessageText: [NSString stringWithFormat: @"Not enough remaining disk space to download \"%@\" completely.",
|
[alert setMessageText: [NSString stringWithFormat: @"Not enough remaining disk space to download \"%@\" completely.",
|
||||||
[self name]]];
|
[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];
|
[alert runModal];
|
||||||
|
|
||||||
return NO;
|
return NO;
|
||||||
|
|
Loading…
Reference in New Issue