summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'Utility')
-rw-r--r--Utility/CopyFile.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/CopyFile.hs b/Utility/CopyFile.hs
index bb0600aa9..9f10cb790 100644
--- a/Utility/CopyFile.hs
+++ b/Utility/CopyFile.hs
@@ -23,11 +23,15 @@ copyFileExternal src dest = do
removeFile dest
boolSystem "cp" $ params ++ [File src, File dest]
where
+#ifndef __ANDROID__
params = map snd $ filter fst
[ (SysConfig.cp_reflink_auto, Param "--reflink=auto")
, (SysConfig.cp_a, Param "-a")
, (SysConfig.cp_p && not SysConfig.cp_a, Param "-p")
]
+#else
+ params = []
+#endif
{- Create a hard link if the filesystem allows it, and fall back to copying
- the file. -}