瀏覽代碼

chore: fs cares only memory and electron files

Tienson Qin 5 月之前
父節點
當前提交
972a5be0a4
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. 5 6
      deps/common/src/logseq/common/path.cljs

+ 5 - 6
deps/common/src/logseq/common/path.cljs

@@ -14,12 +14,11 @@
 (defn is-file-url?
 (defn is-file-url?
   [s]
   [s]
   (and (string? s)
   (and (string? s)
-       (or (string/starts-with? s "file://") ;; mobile platform
-           (string/starts-with? s "content://") ;; android only
-           (string/starts-with? s "assets://") ;; Electron asset, urlencoded
-           (string/starts-with? s "logseq://") ;; reserved for future fs protocol
-           (string/starts-with? s "memory://") ;; special memory fs
-           (string/starts-with? s "s3://"))))
+       (or
+        (string/starts-with? s "memory://") ;; special memory fs
+        (string/starts-with? s "assets://") ;; Electron asset, urlencoded
+        (string/starts-with? s "file://") ;; Electron files
+        )))
 
 
 (defn filename
 (defn filename
   "File name of a path or URL.
   "File name of a path or URL.