From 22a7f14e7b3ec2e84f7fcad6f8e558250d537606 Mon Sep 17 00:00:00 2001 From: Joey Hess <joeyh@joeyh.name> Date: Wed, 2 Sep 2020 14:54:46 -0400 Subject: [PATCH] better dummy value no need for empty string when it's going to be thrown away.. --- Utility/Directory.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Utility/Directory.hs b/Utility/Directory.hs index 8b5b88b746..51eda7139d 100644 --- a/Utility/Directory.hs +++ b/Utility/Directory.hs @@ -110,16 +110,16 @@ moveFile src dest = tryIO (rename src dest) >>= onrename onrename (Left e) | isPermissionError e = rethrow | isDoesNotExistError e = rethrow - | otherwise = viaTmp mv dest "" + | otherwise = viaTmp mv dest () where rethrow = throwM e - mv tmp _ = do - -- copyFile is likely not as optimised as - -- the mv command, so we'll use the command. - -- - -- But, while Windows has a "mv", it does not seem very - -- reliable, so use copyFile there. + mv tmp () = do + -- copyFile is likely not as optimised as + -- the mv command, so we'll use the command. + -- + -- But, while Windows has a "mv", it does not seem very + -- reliable, so use copyFile there. #ifndef mingw32_HOST_OS -- If dest is a directory, mv would move the file -- into it, which is not desired.