We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80c8668 commit 0d0700eCopy full SHA for 0d0700e
1 file changed
MacLibrary/MainViewModel.swift
@@ -71,8 +71,8 @@ public class MainViewModel: BaseViewModel {
71
}
72
73
private func checkApplicationPath() {
74
- let directoryName = URL(filePath: Bundle.main.bundlePath).deletingLastPathComponent().pathComponents.last
75
- if directoryName != "Applications" {
+ let directoryName = URL(filePath: Bundle.main.bundlePath).pathComponents
+ if !(directoryName[0] == "/" && directoryName[1] == "Applications") {
76
alert = AlertState(
77
title: String(localized: "Wrong application location"),
78
message: String(localized: "This app needs to be placed under the Applications folder to work."),
0 commit comments