From 6ce75d90a4f9f9b5a33b3ce1f15ac2bc245a9ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1rady=20Mil=C3=A1n?= <61704770+MilanVarady@users.noreply.github.com> Date: Sun, 2 Jun 2024 07:40:27 +0200 Subject: [PATCH] Fix location check logic --- Source/Marker Data/Marker Data/Views/Main/ContentView.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Marker Data/Marker Data/Views/Main/ContentView.swift b/Source/Marker Data/Marker Data/Views/Main/ContentView.swift index 4578cc6..f3c839e 100644 --- a/Source/Marker Data/Marker Data/Views/Main/ContentView.swift +++ b/Source/Marker Data/Marker Data/Views/Main/ContentView.swift @@ -117,8 +117,10 @@ struct ContentView: View { } // Notify user if Marker Data is installed outisde of the the Applications folder .onAppear { - if !ignoreInstallLocation && Bundle.main.resourceURL != URL.markerDataApp { - showInstallLocationAlert = true + if let appURL = Bundle.main.resourceURL { + if !ignoreInstallLocation && !appURL.hasPrefix(url: .applicationDirectory) { + showInstallLocationAlert = true + } } } .alert("Install Location Warning", isPresented: $showInstallLocationAlert) {