mirror of
https://github.com/logseq/logseq.git
synced 2026-04-27 23:54:55 +00:00
fix: remove redundancy paths on db
This commit also removes the fragile files including page-metadata.edn and metadata.edn.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
(ns frontend.fs.capacitor-fs
|
||||
"Implementation of fs protocol for mobile"
|
||||
(:require ["@capacitor/filesystem" :refer [Encoding Filesystem Directory]]
|
||||
(:require ["@capacitor/filesystem" :refer [Encoding Filesystem]]
|
||||
[cljs-bean.core :as bean]
|
||||
[clojure.string :as string]
|
||||
[goog.string :as gstring]
|
||||
@@ -227,20 +227,25 @@
|
||||
(js/encodeURI %)
|
||||
|
||||
:else
|
||||
(js/encodeURI (js/decodeURI %))))]
|
||||
(js/encodeURI (js/decodeURI %))))
|
||||
path' (cond
|
||||
(and path (string/starts-with? path "file:/"))
|
||||
(safe-encode-url path)
|
||||
|
||||
(cond (string/blank? path)
|
||||
(safe-encode-url dir)
|
||||
(string/blank? path)
|
||||
(safe-encode-url dir)
|
||||
|
||||
(string/blank? dir)
|
||||
(safe-encode-url path)
|
||||
(string/blank? dir)
|
||||
(safe-encode-url path)
|
||||
|
||||
(string/starts-with? path dir)
|
||||
(safe-encode-url path)
|
||||
(string/starts-with? path dir)
|
||||
(safe-encode-url path)
|
||||
|
||||
:else
|
||||
(let [path' (safe-encode-url path)]
|
||||
(str dir "/" path')))))
|
||||
:else
|
||||
(let [path' (safe-encode-url path)]
|
||||
(str dir "/" path')))
|
||||
path' (string/replace path' "///private/" "///")]
|
||||
path'))
|
||||
|
||||
(defn- local-container-path?
|
||||
"Check whether `path' is logseq's container `localDocumentsPath' on iOS"
|
||||
|
||||
Reference in New Issue
Block a user