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