From 134053a325dda6fe84dc097044d66ae945bf29bc Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 30 Mar 2022 14:52:52 +0800 Subject: [PATCH] ctlIME // Allow opeing specified user data (folder). --- Source/Modules/IMEModules/ctlInputMethod.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index e2c953fe..9dea56d4 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -284,7 +284,7 @@ class ctlInputMethod: IMKInputController { private func open(userFileAt path: String) { func checkIfUserFilesExist() -> Bool { if !mgrLangModel.checkIfUserLanguageModelFilesExist() { - let content = String(format: NSLocalizedString("Please check the permission at \"%@\".", comment: ""), mgrLangModel.dataFolderPath) + let content = String(format: NSLocalizedString("Please check the permission at \"%@\".", comment: ""), mgrLangModel.dataFolderPath(isDefaultFolder: false)) ctlNonModalAlertWindow.shared.show(title: NSLocalizedString("Unable to create the user phrase file.", comment: ""), content: content, confirmButtonTitle: NSLocalizedString("OK", comment: ""), cancelButtonTitle: nil, cancelAsDefault: false, delegate: nil) NSApp.setActivationPolicy(.accessory) return false @@ -306,7 +306,7 @@ class ctlInputMethod: IMKInputController { if !mgrLangModel.checkIfUserDataFolderExists() { return } - NSWorkspace.shared.openFile(mgrLangModel.dataFolderPath, withApplication: "Finder") + NSWorkspace.shared.openFile(mgrLangModel.dataFolderPath(isDefaultFolder: false), withApplication: "Finder") } @objc func openExcludedPhrases(_ sender: Any?) {