diff --git a/src/main/frontend/fs.cljs b/src/main/frontend/fs.cljs index a6e43b1f755..6bf868c8038 100644 --- a/src/main/frontend/fs.cljs +++ b/src/main/frontend/fs.cljs @@ -278,12 +278,13 @@ (let [path (if (util/starts-with? path "/") path (str "/" path))] - (util/p-handle - (stat dir path) - (fn [_stat] true) - (fn [error] - (write-file repo dir path initial-content) - false))))) + (-> + (p/let [_ (stat dir path)] + true) + (p/catch + (fn [_error] + (p/let [_ (write-file repo dir path initial-content)] + false))))))) (defn file-exists? [dir path]