fix(android): ignore reading files containing # or %

User can use "#" and "%" in page name, but those two chars will be
replaced by "_", as same as the behaviors on desktop.
pull/3535/head
leizhe 2021-12-15 16:46:43 +08:00 committed by Tienson Qin
parent 571d83e6f6
commit 42019d1f9f
2 changed files with 5 additions and 2 deletions

View File

@ -47,7 +47,8 @@
files (->> files
(remove (fn [file]
(or (string/starts-with? file ".")
(string/starts-with? file "#")
(string/includes? file "#")
(string/includes? file "%")
(= file "bak")))))
files (->> files
(map (fn [file]

View File

@ -1128,7 +1128,9 @@
(remove-boundary-slashes)
(string/replace #"/" ".")
;; Windows reserved path characters
(string/replace windows-reserved-chars "_")))
(string/replace windows-reserved-chars "_")
;; for android filesystem compatiblity
(string/replace #"%#" "_")))
(defn lowercase-first
[s]