Skip to content

Commit

Permalink
Merge pull request #7538 from nextcloud/backport/7537/stable-3.14
Browse files Browse the repository at this point in the history
[stable-3.14] Do not treat bundles as executables in codesign check
  • Loading branch information
claucambra authored Nov 21, 2024
2 parents 7638655 + b2d9316 commit 5563f9a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion admin/osx/mac-crafter/Sources/Utils/Codesign.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5563f9a

Please sign in to comment.