Переглянути джерело

fix(electron): windows path escape with colon

Andelf 3 роки тому
батько
коміт
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
   []