mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Merge pull request #795 from zorgiepoo/check-parent-writability
Check the bundle's parent directory for writability too
This commit is contained in:
commit
0132377a2a
1 file changed
+4
-1
Vendored
+4
-1
@@ -71,7 +71,10 @@
|
||||
}
|
||||
|
||||
// Can we automatically update in the background without bugging the user (e.g, with a administrator password prompt)?
|
||||
return [[NSFileManager defaultManager] isWritableFileAtPath:self.bundlePath];
|
||||
// Note it's very well possible to have the bundle be writable but not be able to write into the parent directory
|
||||
// And if the bundle isn't writable, but we can write into the parent directory, we will still need to authorize to replace it
|
||||
NSString *bundlePath = [self bundlePath];
|
||||
return [[NSFileManager defaultManager] isWritableFileAtPath:bundlePath.stringByDeletingLastPathComponent] && [[NSFileManager defaultManager] isWritableFileAtPath:bundlePath];
|
||||
}
|
||||
|
||||
- (NSString *)appCachePath
|
||||
|
||||
Reference in new issue
Block a user