From f5eb5583021715ea18eb90113924e2309ff4395a Mon Sep 17 00:00:00 2001 From: ACTCD <101378590+ACTCD@users.noreply.github.com> Date: Fri, 3 Mar 2023 22:40:40 +0800 Subject: [PATCH 1/2] Revert "Canonical save file name" --- xcode/Safari-Extension/Functions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcode/Safari-Extension/Functions.swift b/xcode/Safari-Extension/Functions.swift index e1c730df..b2c04f1c 100644 --- a/xcode/Safari-Extension/Functions.swift +++ b/xcode/Safari-Extension/Functions.swift @@ -1718,7 +1718,7 @@ func saveFile(_ item: [String: Any],_ content: String) -> [String: Any] { var name = sanitize(n) // construct new file name - let newFilename = "\(name).user.\(type)" + let newFilename = "\(name).\(type)" // security scope let didStartAccessing = saveLocation.startAccessingSecurityScopedResource() From befc5c79e2046d1bf94c73ee453b7e831c07fc28 Mon Sep 17 00:00:00 2001 From: ACTCD <101378590+ACTCD@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:08:36 +0800 Subject: [PATCH 2/2] fix: canonical save file name again --- xcode/Safari-Extension/Functions.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcode/Safari-Extension/Functions.swift b/xcode/Safari-Extension/Functions.swift index b2c04f1c..f7b20659 100644 --- a/xcode/Safari-Extension/Functions.swift +++ b/xcode/Safari-Extension/Functions.swift @@ -1718,7 +1718,7 @@ func saveFile(_ item: [String: Any],_ content: String) -> [String: Any] { var name = sanitize(n) // construct new file name - let newFilename = "\(name).\(type)" + let newFilename = "\(name).user.\(type)" // security scope let didStartAccessing = saveLocation.startAccessingSecurityScopedResource() @@ -2028,7 +2028,7 @@ func installUserscript(_ content: String) -> [String: Any]? { return nil } let name = sanitize(n) - let filename = "\(name).js" + let filename = "\(name).user.js" let saved = saveFile(["filename": filename, "type": "js"], content) return saved