mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Fix binary delta testFileSystemCompression failing on macOS 27 (#2904)
This commit is contained in:
2 files changed
+9
-3
No files matched your search
@@ -450,10 +450,16 @@ BOOL applyBinaryDelta(NSString *source, NSString *finalDestination, NSString *pa
|
||||
fprintf(stderr, "\nApplying file system compression...");
|
||||
}
|
||||
|
||||
NSTask *dittoTask = [[NSTask alloc] init];
|
||||
NSMutableArray<NSString *> *dittoArguments = [@[@"--hfsCompression"] mutableCopy];
|
||||
if (@available(macOS 27, *)) {
|
||||
// Compression won't be applied on macOS 27 without passing --noclone
|
||||
[dittoArguments addObject:@"--noclone"];
|
||||
}
|
||||
[dittoArguments addObjectsFromArray:@[destination, finalDestination]];
|
||||
|
||||
NSTask *dittoTask = [[NSTask alloc] init];
|
||||
dittoTask.executableURL = [NSURL fileURLWithPath:@"/usr/bin/ditto" isDirectory:NO];
|
||||
dittoTask.arguments = @[@"--hfsCompression", destination, finalDestination];
|
||||
dittoTask.arguments = [dittoArguments copy];
|
||||
|
||||
// If we fail to apply file system compression, we will try falling back to not doing this
|
||||
BOOL failedToApplyFileSystemCompression = NO;
|
||||
|
||||
@@ -1377,7 +1377,7 @@ typedef void (^SUDeltaHandler)(NSFileManager *fileManager, NSString *sourceDirec
|
||||
NSTask *dittoTask = [[NSTask alloc] init];
|
||||
dittoTask.executableURL = [NSURL fileURLWithPath:@"/usr/bin/ditto" isDirectory:NO];
|
||||
|
||||
dittoTask.arguments = @[@"--hfsCompression", destinationFile, destinationFile2];
|
||||
dittoTask.arguments = @[@"--hfsCompression", @"--noclone", destinationFile, destinationFile2];
|
||||
|
||||
NSError *launchError = nil;
|
||||
BOOL launched = [dittoTask launchAndReturnError:&launchError];
|
||||
|
||||
Reference in new issue
Block a user