소스 검색

fix(electron): windows path escape with colon

Andelf 4 년 전
부모
커밋
114a8a5ace
1개의 변경된 파일10개의 추가작업 그리고 6개의 파일을 삭제
  1. 10 6
      src/electron/electron/handler.cljs

+ 10 - 6
src/electron/electron/handler.cljs

@@ -154,12 +154,16 @@
 (defn- sanitize-graph-name
   [graph-name]
   (when graph-name
-    (string/replace graph-name "/" "++")))
-
-(defn- graph-name->path
-  [graph-name]
-  (when graph-name
-    (string/replace graph-name "++" "/")))
+    (-> graph-name
+        (string/replace "/" "++")
+        (string/replace ":" "+3A+"))))
+
+ (defn- graph-name->path
+   [graph-name]
+   (when graph-name
+     (-> graph-name
+         (string/replace "+3A+" ":")
+         (string/replace "++" "/"))))
 
 (defn- get-graphs-dir
   []