feat: prevent users from quitting finder (closes #362)

This commit is contained in:
Louis Pontoise authored and lwouis committed 2020-05-29 02:00:29 +09:00
1 parent c6c421ed56
commit a1338c0051
1 file changed
+2
+2
View File
@@ -104,6 +104,8 @@ class Window {
}
func quitApp() {
// prevent users from quitting Finder
if application.runningApplication.bundleIdentifier == "com.apple.finder" { return }
BackgroundWork.accessibilityCommandsQueue.asyncWithCap { [weak self] in
self?.application.runningApplication.terminate()
}