mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: failed to share file with special chars in its filename
This commit is contained in:
@@ -78,10 +78,12 @@
|
||||
(p/let [time (date/get-current-time)
|
||||
title (some-> (or title (path/basename url))
|
||||
js/decodeURIComponent
|
||||
util/node-path.name)
|
||||
util/node-path.name
|
||||
util/file-name-sanity
|
||||
(string/replace "." ""))
|
||||
path (path/join (config/get-repo-dir (state/get-current-repo))
|
||||
(config/get-pages-directory)
|
||||
(path/basename url))
|
||||
(str (js/encodeURI title) (path/extname url)))
|
||||
_ (p/catch
|
||||
(.copy Filesystem (clj->js {:from url :to path}))
|
||||
(fn [error]
|
||||
|
||||
Reference in New Issue
Block a user