mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 20:45:51 +03:00
Merge pull request #7537 from nextcloud/bugfix/exec-detection-mac-crafter
Do not treat bundles as executables in codesign check
This commit is contained in:
commit
92d0dca614
1 changed files with 4 additions and 1 deletions
|
@ -33,7 +33,10 @@ func isAppExtension(_ path: String) -> Bool {
|
|||
}
|
||||
|
||||
func isExecutable(_ path: String) -> Bool {
|
||||
FileManager.default.isExecutableFile(atPath: path)
|
||||
let fm = FileManager.default
|
||||
var isDir: ObjCBool = false
|
||||
let exists = fm.fileExists(atPath: path, isDirectory: &isDir)
|
||||
return fm.isExecutableFile(atPath: path) && !isDir.boolValue && exists
|
||||
}
|
||||
|
||||
func codesign(identity: String, path: String, options: String = defaultCodesignOptions) throws {
|
||||
|
|
Loading…
Reference in a new issue