|
@@ -12,20 +12,6 @@
|
|
|
(and (util/electron?)
|
|
|
(:assets/alias-enabled? @state/state)))
|
|
|
|
|
|
-(defn encode-to-protect-assets-schema-path
|
|
|
- [schema-path]
|
|
|
- (cond-> schema-path
|
|
|
- (string? schema-path)
|
|
|
- (->
|
|
|
- (string/replace #"\\+" "/")
|
|
|
- (string/replace ":/" "/logseq__colon/"))))
|
|
|
-
|
|
|
-(defn decode-protected-assets-schema-path
|
|
|
- [schema-path]
|
|
|
- (cond-> schema-path
|
|
|
- (string? schema-path)
|
|
|
- (string/replace "/logseq__colon/" ":/")))
|
|
|
-
|
|
|
(defn clean-path-prefix
|
|
|
[path]
|
|
|
(when (string? path)
|
|
@@ -86,9 +72,7 @@
|
|
|
(second (get-alias-by-name (second (re-find #"^@([^\/]+)" full-path')))))
|
|
|
(vector full-path')))))]
|
|
|
|
|
|
- (str "assets://"
|
|
|
- (encode-to-protect-assets-schema-path
|
|
|
- (string/replace full-path' (str "@" (:name alias)) (:dir alias))))
|
|
|
+ (str "assets://" (string/replace full-path' (str "@" (:name alias)) (:dir alias)))
|
|
|
|
|
|
(str (if has-schema? "" "file://")
|
|
|
(util/node-path.join graph-root full-path))))]
|