mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Merge pull request #683 from zorgiepoo/copy-auth-perm
Handle additional permission denied code when copying files
This commit is contained in:
commit
6351ee86b9
1 file changed
+3
-1
Vendored
+3
-1
@@ -386,7 +386,9 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
|
||||
return YES;
|
||||
}
|
||||
|
||||
if (copyResult != permErr) {
|
||||
// Note: I have recieved afpAccessDenied error in testing even when not copying from/to an AFP mount,
|
||||
// when the error should have been a normal permission denied one
|
||||
if (copyResult != permErr && copyResult != afpAccessDenied) {
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:NSOSStatusErrorDomain code:copyResult userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Failed to copy file (%@)", sourceURL.lastPathComponent] }];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user