move all string/join used to construct paths to one place

This commit is contained in:
rcmerci
2023-03-01 22:00:25 +08:00
committed by Gabriel Horner
parent 974e91c995
commit de2c1f7445
8 changed files with 20 additions and 13 deletions

View File

@@ -162,7 +162,7 @@
(when current-file
(let [parts (string/split current-file #"/")
parts-2 (string/split path #"/")
current-dir (string/join "/" (drop-last 1 parts))]
current-dir (util/string-join-path (drop-last 1 parts))]
(cond
(if util/win32? (utils/win32 path) (util/starts-with? path "/"))
path
@@ -187,7 +187,7 @@
parts
(rest col)))))
parts (remove #(string/blank? %) parts)]
(string/join "/" (reverse parts))))))))
(util/string-join-path (reverse parts))))))))
(rum/defcs asset-loader
< rum/reactive