mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-21 10:51:04 +00:00
Improve archiving on full disks
This commit is contained in:
parent
18653e0506
commit
3b29353dd8
2 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2018-04-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcCommand.m: Do not try to compress old debug files if there is
|
||||
not enough space on the filesystem for both the uncompressed and
|
||||
compressed versions to co-exist while compressing. Instead delete
|
||||
the file and generate an error message.
|
||||
|
||||
2018-03-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcControl.m: Allow EcControlKeyTest to be defined to supply a key
|
||||
|
|
|
@ -2642,6 +2642,13 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
|
|||
[mgr removeFileAtPath: src handler: nil];
|
||||
continue; // Nothing to compress
|
||||
}
|
||||
if ([a fileSize] >= [[[mgr fileSystemAttributesAtPath: src]
|
||||
objectForKey: NSFileSystemFreeSize] integerValue])
|
||||
{
|
||||
[mgr removeFileAtPath: src handler: nil];
|
||||
[self cmdError: @"Unable to compress %@ (too big; deleted)", src];
|
||||
continue; // Not enough space free to compress
|
||||
}
|
||||
|
||||
dst = [src stringByAppendingPathExtension: @"gz"];
|
||||
if ([mgr fileExistsAtPath: dst isDirectory: &isDirectory] == YES)
|
||||
|
|
Loading…
Reference in a new issue