1
0
mirror of https://github.com/janet-lang/janet synced 2026-05-28 16:22:16 +00:00

Replace forward slash in xcopy commands.

xcopy doesn't handle them in paths.
This commit is contained in:
Calvin Rose
2020-05-21 00:18:07 -04:00
parent 617338457d
commit 5caa0371c4
+3 -1
View File
@@ -141,7 +141,9 @@
(if is-win
(let [end (last (peg/match path-splitter src))
isdir (= (os/stat src :mode) :directory)]
(shell "C:\\Windows\\System32\\xcopy.exe" src (if isdir (string dest "\\" end) dest) "/y" "/s" "/e" "/i"))
(shell "C:\\Windows\\System32\\xcopy.exe"
(string/replace "/" "\\" src) (string/replace "/" "\\" (if isdir (string dest "\\" end) dest))
"/y" "/s" "/e" "/i"))
(shell "cp" "-rf" src dest)))
(defn mkdir