浏览代码

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."