better dummy value
no need for empty string when it's going to be thrown away..
This commit is contained in:
parent
6e9a4f50f3
commit
22a7f14e7b
1 changed files with 7 additions and 7 deletions
|
@ -110,16 +110,16 @@ moveFile src dest = tryIO (rename src dest) >>= onrename
|
||||||
onrename (Left e)
|
onrename (Left e)
|
||||||
| isPermissionError e = rethrow
|
| isPermissionError e = rethrow
|
||||||
| isDoesNotExistError e = rethrow
|
| isDoesNotExistError e = rethrow
|
||||||
| otherwise = viaTmp mv dest ""
|
| otherwise = viaTmp mv dest ()
|
||||||
where
|
where
|
||||||
rethrow = throwM e
|
rethrow = throwM e
|
||||||
|
|
||||||
mv tmp _ = do
|
mv tmp () = do
|
||||||
-- copyFile is likely not as optimised as
|
-- copyFile is likely not as optimised as
|
||||||
-- the mv command, so we'll use the command.
|
-- the mv command, so we'll use the command.
|
||||||
--
|
--
|
||||||
-- But, while Windows has a "mv", it does not seem very
|
-- But, while Windows has a "mv", it does not seem very
|
||||||
-- reliable, so use copyFile there.
|
-- reliable, so use copyFile there.
|
||||||
#ifndef mingw32_HOST_OS
|
#ifndef mingw32_HOST_OS
|
||||||
-- If dest is a directory, mv would move the file
|
-- If dest is a directory, mv would move the file
|
||||||
-- into it, which is not desired.
|
-- into it, which is not desired.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue