mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-10 17:47:19 +00:00
Nicer check
This commit is contained in:
parent
de2252fccb
commit
8f74b5d72e
@ -6,17 +6,16 @@ struct ApplicationDirectoryController {
|
||||
extension ApplicationDirectoryController {
|
||||
|
||||
var isInApplicationsDirectory: Bool {
|
||||
#if DEBUG
|
||||
return true
|
||||
#else
|
||||
let bundlePath = Bundle.main.bundlePath
|
||||
for directory in NSSearchPathForDirectoriesInDomains(.applicationDirectory, .allDomainsMask, true) {
|
||||
if bundlePath.hasPrefix(directory) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if bundlePath.contains("/Library/Developer/Xcode") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user