mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Integrate trying to preserve Finder tags in 2.x
https://github.com/sparkle-project/Sparkle/commit/1081dcdda187a9be5635594d388090f78de940f9
This commit is contained in:
1 parent
3c0e02f333
commit
6e326f3cea
1 file changed
+8
@@ -133,6 +133,14 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
// Try to preserve Finder Tags
|
||||
// TODO: If we ever migrate to -[NSFileManager replaceItemAtURL:..] method, which we should at some point, we wouldn't have to do this step
|
||||
NSArray *resourceTags = nil;
|
||||
BOOL retrievedResourceTags = [oldURL getResourceValue:&resourceTags forKey:NSURLTagNamesKey error:NULL];
|
||||
if (retrievedResourceTags && resourceTags.count > 0) {
|
||||
[newTempURL setResourceValue:resourceTags forKey:NSURLTagNamesKey error:NULL];
|
||||
}
|
||||
|
||||
// We must leave moving the app to its destination as the final step in installing it, so that
|
||||
// it's not possible our new app can be left in an incomplete state at the final destination
|
||||
if (![fileManager changeOwnerAndGroupOfItemAtRootURL:newTempURL toMatchURL:oldURL error:error]) {
|
||||
|
||||
Reference in new issue
Block a user