From 2e8fc4d17a376a58f16fa262b0f7406efc38886c Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 19 Mar 2021 10:28:59 -0700 Subject: [PATCH] Don't make changing owner/group a hard fatal error --- Autoupdate/SUPlainInstaller.m | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Autoupdate/SUPlainInstaller.m b/Autoupdate/SUPlainInstaller.m index c7f621e7..ab517ab6 100644 --- a/Autoupdate/SUPlainInstaller.m +++ b/Autoupdate/SUPlainInstaller.m @@ -152,16 +152,13 @@ // 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]) { - // But this is big enough of a deal to fail - if (error != NULL) { - *error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to change owner and group of new app at %@ to match old app at %@", newTempURL.path, oldURL.path] }]; - } - - [fileManager removeItemAtURL:tempNewDirectoryURL error:NULL]; - return NO; - } + NSError *changeOwnerAndGroupError = nil; + if (![fileManager changeOwnerAndGroupOfItemAtRootURL:newTempURL toMatchURL:oldURL error:&changeOwnerAndGroupError]) { + // Not a fatal error + SULog(SULogLevelError, @"Failed to change owner and group of new app at %@ to match old app at %@", newTempURL.path, oldURL.path); + SULog(SULogLevelError, @"Error: %@", changeOwnerAndGroupError); + } if (progress) { progress(5/10.0);