From 15439ab5b5c489539eb211353308d186a77398cf Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 3 Jun 2022 09:16:37 +0800 Subject: [PATCH] PrefUI & PrefWindow // Use Swift String with expandingTildeInPath. --- Source/UI/PrefUI/suiPrefPaneDictionary.swift | 2 +- Source/WindowControllers/ctlPrefWindow.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/UI/PrefUI/suiPrefPaneDictionary.swift b/Source/UI/PrefUI/suiPrefPaneDictionary.swift index e8376b3e..cb0b1bfd 100644 --- a/Source/UI/PrefUI/suiPrefPaneDictionary.swift +++ b/Source/UI/PrefUI/suiPrefPaneDictionary.swift @@ -65,7 +65,7 @@ struct suiPrefPaneDictionary: View { IME.dlgOpenPath.canChooseDirectories = true let bolPreviousFolderValidity = mgrLangModel.checkIfSpecifiedUserDataFolderValid( - NSString(string: mgrPrefs.userDataFolderSpecified).expandingTildeInPath) + mgrPrefs.userDataFolderSpecified.expandingTildeInPath) if let window = ctlPrefUI.shared.controller.window { IME.dlgOpenPath.beginSheetModal(for: window) { result in diff --git a/Source/WindowControllers/ctlPrefWindow.swift b/Source/WindowControllers/ctlPrefWindow.swift index fc8812da..b73f64ff 100644 --- a/Source/WindowControllers/ctlPrefWindow.swift +++ b/Source/WindowControllers/ctlPrefWindow.swift @@ -263,7 +263,7 @@ class ctlPrefWindow: NSWindowController { IME.dlgOpenPath.canChooseDirectories = true let bolPreviousFolderValidity = mgrLangModel.checkIfSpecifiedUserDataFolderValid( - NSString(string: mgrPrefs.userDataFolderSpecified).expandingTildeInPath) + mgrPrefs.userDataFolderSpecified.expandingTildeInPath) if window != nil { IME.dlgOpenPath.beginSheetModal(for: window!) { result in