ctlPrefWindow // Append trailing slash to the path read by ComDlg32.
- Already patched in the incoming Dictionary pane of the PrefUI.
This commit is contained in:
parent
9b85039069
commit
e1c934d272
|
@ -266,10 +266,12 @@ import Cocoa
|
||||||
IME.dlgOpenPath.beginSheetModal(for: self.window!) { result in
|
IME.dlgOpenPath.beginSheetModal(for: self.window!) { result in
|
||||||
if result == NSApplication.ModalResponse.OK {
|
if result == NSApplication.ModalResponse.OK {
|
||||||
if IME.dlgOpenPath.url != nil {
|
if IME.dlgOpenPath.url != nil {
|
||||||
if mgrLangModel.checkIfSpecifiedUserDataFolderValid(
|
// CommonDialog 讀入的路徑沒有結尾斜槓,這會導致檔案目錄合規性判定失準。
|
||||||
IME.dlgOpenPath.url!.path)
|
// 所以要手動補回來。
|
||||||
{
|
var newPath = IME.dlgOpenPath.url!.path
|
||||||
mgrPrefs.userDataFolderSpecified = IME.dlgOpenPath.url!.path
|
newPath.ensureTrailingSlash()
|
||||||
|
if mgrLangModel.checkIfSpecifiedUserDataFolderValid(newPath) {
|
||||||
|
mgrPrefs.userDataFolderSpecified = newPath
|
||||||
IME.initLangModels(userOnly: true)
|
IME.initLangModels(userOnly: true)
|
||||||
} else {
|
} else {
|
||||||
clsSFX.beep()
|
clsSFX.beep()
|
||||||
|
|
Loading…
Reference in New Issue