fix(fs): avoid EEXISTS error reporting for mkdir

pull/10662/head
Andelf 2023-12-07 16:20:41 +08:00 committed by Tienson Qin
parent 2318e850dd
commit 099cad5b64
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@
(-> (ipc/ipc "mkdir" dir)
(p/then (fn [_] (js/console.log (str "Directory created: " dir))))
(p/catch (fn [error]
(when (not= (.-code error) "EEXIST")
(when-not (string/includes? (str error) "EEXIST")
(js/console.error (str "Error creating directory: " dir) error))))))
(mkdir-recur! [_this dir]