summaryrefslogtreecommitdiff
path: root/CopyFile.hs
diff options
context:
space:
mode:
Diffstat (limited to 'CopyFile.hs')
-rw-r--r--CopyFile.hs14
1 files changed, 6 insertions, 8 deletions
diff --git a/CopyFile.hs b/CopyFile.hs
index 73d911a29..4575fb08a 100644
--- a/CopyFile.hs
+++ b/CopyFile.hs
@@ -20,14 +20,12 @@ copyFile src dest = do
e <- doesFileExist dest
when e $
removeFile dest
- boolSystem "cp" opts
+ boolSystem "cp" [params, File src, File dest]
where
- opts = if SysConfig.cp_reflink_auto
- then ["--reflink=auto", src', dest']
+ params = if SysConfig.cp_reflink_auto
+ then Params "--reflink=auto"
else if SysConfig.cp_a
- then ["-a", src', dest']
+ then Params "-a"
else if SysConfig.cp_p
- then ["-p", src', dest']
- else [src', dest']
- src' = utilityEscape src
- dest' = utilityEscape dest
+ then Params "-p"
+ else Params ""