mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 03:16:37 +00:00
fix(android): handle path with spaces
This commit is contained in:
@@ -275,12 +275,10 @@
|
||||
(readdir dir))
|
||||
(unlink! [this repo path _opts]
|
||||
(p/let [path (get-file-path nil path)
|
||||
path (if (string/starts-with? path "file://")
|
||||
(string/replace-first path "file://" "")
|
||||
path)
|
||||
repo-dir (config/get-local-dir repo)
|
||||
recycle-dir (str repo-dir config/app-name "/.recycle") ;; logseq/.recycle
|
||||
file-name (-> (string/replace path repo-dir "")
|
||||
repo-url (config/get-local-dir repo)
|
||||
recycle-dir (str repo-url config/app-name "/.recycle") ;; logseq/.recycle
|
||||
;; convert url to pure path
|
||||
file-name (-> (string/replace path repo-url "")
|
||||
(string/replace "/" "_")
|
||||
(string/replace "\\" "_"))
|
||||
new-path (str recycle-dir "/" file-name)]
|
||||
|
||||
Reference in New Issue
Block a user