From 74cd7041dcd78261832b04fff92a6e1219be345d Mon Sep 17 00:00:00 2001 From: Andrej Mihajlov Date: Mon, 21 Dec 2020 17:57:18 +0100 Subject: [PATCH] Keychain: prevent call to stat() when determining appex path Signed-off-by: Andrej Mihajlov --- Sources/Shared/Keychain.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Shared/Keychain.swift b/Sources/Shared/Keychain.swift index e301fed..c6e7526 100644 --- a/Sources/Shared/Keychain.swift +++ b/Sources/Shared/Keychain.swift @@ -44,7 +44,7 @@ class Keychain { items[kSecAttrSynchronizable] = false items[kSecAttrAccessible] = kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly - guard let extensionPath = Bundle.main.builtInPlugInsURL?.appendingPathComponent("WireGuardNetworkExtension.appex").path else { + guard let extensionPath = Bundle.main.builtInPlugInsURL?.appendingPathComponent("WireGuardNetworkExtension.appex", isDirectory: true).path else { wg_log(.error, staticMessage: "Unable to determine app extension path") return nil } -- 2.47.2