fix kiss-vscode no config error

This commit is contained in:
2022-06-11 18:27:38 +00:00
parent 5cc73b683e
commit dac925ddf2
2 changed files with 5 additions and 2 deletions

View File

@@ -32,7 +32,8 @@
->errorMessage { ->errorMessage {
(try (try
{ {
(FileSystem.deleteDirectory activeConfigDir) (when (FileSystem.exists activeConfigDir)
(FileSystem.deleteDirectory activeConfigDir))
(when (FileSystem.exists lastConfigDir) (when (FileSystem.exists lastConfigDir)
(FileSystem.rename lastConfigDir activeConfigDir)) (FileSystem.rename lastConfigDir activeConfigDir))
} }
@@ -76,7 +77,9 @@
oldFileMTime oldFileMTime
(mTime oldConfigFile) (mTime oldConfigFile)
userConfigMTime userConfigMTime
(let [foldersToCheck [(userConfigDir) builtinConfigDir]] (let [foldersToCheck [builtinConfigDir]]
(when (FileSystem.exists (userConfigDir))
(foldersToCheck.insert 0 (userConfigDir)))
(when commandsDir (when commandsDir
(foldersToCheck.push commandsDir)) (foldersToCheck.push commandsDir))
(apply max (apply max