mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-06-28 17:01:37 +00:00
Update for Big Sur & SwiftUI 2 (#128)
This commit is contained in:
21
Secretive/Controllers/ApplicationDirectoryController.swift
Normal file
21
Secretive/Controllers/ApplicationDirectoryController.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
import Foundation
|
||||
|
||||
struct ApplicationDirectoryController {
|
||||
}
|
||||
|
||||
extension ApplicationDirectoryController {
|
||||
|
||||
var isInApplicationsDirectory: Bool {
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user