|
|
@@ -371,26 +371,28 @@
|
|
|
(util/node-path.join (get-repo-dir repo-url) path)))
|
|
|
|
|
|
(defn get-file-path
|
|
|
+ "Normalization happens here"
|
|
|
[repo-url relative-path]
|
|
|
(when (and repo-url relative-path)
|
|
|
- (cond
|
|
|
- (and (or (util/electron?) (mobile-util/native-android?)) (local-db? repo-url))
|
|
|
- (let [dir (get-repo-dir repo-url)]
|
|
|
- (if (string/starts-with? relative-path dir)
|
|
|
- relative-path
|
|
|
- (str dir "/"
|
|
|
- (string/replace relative-path #"^/" ""))))
|
|
|
-
|
|
|
- (and (mobile-util/native-ios?) (local-db? repo-url))
|
|
|
- (let [dir (-> (get-repo-dir repo-url)
|
|
|
- (string/replace "file:///" "file:/"))]
|
|
|
- (js/decodeURI (str dir relative-path)))
|
|
|
-
|
|
|
- (= "/" (first relative-path))
|
|
|
- (subs relative-path 1)
|
|
|
-
|
|
|
- :else
|
|
|
- relative-path)))
|
|
|
+ (let [path (cond
|
|
|
+ (and (or (util/electron?) (mobile-util/native-android?)) (local-db? repo-url))
|
|
|
+ (let [dir (get-repo-dir repo-url)]
|
|
|
+ (if (string/starts-with? relative-path dir)
|
|
|
+ relative-path
|
|
|
+ (str dir "/"
|
|
|
+ (string/replace relative-path #"^/" ""))))
|
|
|
+
|
|
|
+ (and (mobile-util/native-ios?) (local-db? repo-url))
|
|
|
+ (let [dir (-> (get-repo-dir repo-url)
|
|
|
+ (string/replace "file:///" "file:/"))]
|
|
|
+ (js/decodeURI (str dir relative-path)))
|
|
|
+
|
|
|
+ (= "/" (first relative-path))
|
|
|
+ (subs relative-path 1)
|
|
|
+
|
|
|
+ :else
|
|
|
+ relative-path)]
|
|
|
+ (util/path-normalize path))))
|
|
|
|
|
|
(defn get-config-path
|
|
|
([]
|