Преглед изворни кода

fix(fs): normalize path when readdir

rcmerci пре 3 година
родитељ
комит
bbfaefac5b
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      src/main/frontend/fs.cljs

+ 3 - 2
src/main/frontend/fs.cljs

@@ -58,8 +58,9 @@
   (p/let [result (protocol/readdir (get-fs dir) dir)
           result (bean/->clj result)]
     (if (and path-only? (map? (first result)))
-      (map :uri result)
-      result)))
+      (->> (map :uri result)
+           (map gp-util/path-normalize))
+      (map #(update % :uri gp-util/path-normalize) result))))
 
 (defn unlink!
   "Should move the path to logseq/recycle instead of deleting it."