Skip to content

Commit 0d0700e

Browse files
committed
Fix app path requirements check, attempt 2
1 parent 80c8668 commit 0d0700e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

MacLibrary/MainViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public class MainViewModel: BaseViewModel {
7171
}
7272

7373
private func checkApplicationPath() {
74-
let directoryName = URL(filePath: Bundle.main.bundlePath).deletingLastPathComponent().pathComponents.last
75-
if directoryName != "Applications" {
74+
let directoryName = URL(filePath: Bundle.main.bundlePath).pathComponents
75+
if !(directoryName[0] == "/" && directoryName[1] == "Applications") {
7676
alert = AlertState(
7777
title: String(localized: "Wrong application location"),
7878
message: String(localized: "This app needs to be placed under the Applications folder to work."),

0 commit comments

Comments
 (0)