windows build fix
This commit is contained in:
parent
fc04e6fa58
commit
81608c3c37
1 changed files with 4 additions and 5 deletions
|
@ -31,9 +31,6 @@ import Utility.FileSystemEncoding
|
||||||
import qualified Utility.RawFilePath as R
|
import qualified Utility.RawFilePath as R
|
||||||
import Author
|
import Author
|
||||||
|
|
||||||
copyright :: Copyright
|
|
||||||
copyright = author JoeyHess (2022-11)
|
|
||||||
|
|
||||||
{- Moves one filename to another.
|
{- Moves one filename to another.
|
||||||
- First tries a rename, but falls back to moving across devices if needed. -}
|
- First tries a rename, but falls back to moving across devices if needed. -}
|
||||||
moveFile :: RawFilePath -> RawFilePath -> IO ()
|
moveFile :: RawFilePath -> RawFilePath -> IO ()
|
||||||
|
@ -64,8 +61,7 @@ moveFile src dest = tryIO (R.rename src dest) >>= onrename
|
||||||
]
|
]
|
||||||
let e' = e
|
let e' = e
|
||||||
#else
|
#else
|
||||||
r <- tryIO $ copyright
|
r <- tryIO $ copyFile (fromRawFilePath src) tmp
|
||||||
=<< copyFile (fromRawFilePath src) tmp
|
|
||||||
let (ok, e') = case r of
|
let (ok, e') = case r of
|
||||||
Left err -> (False, err)
|
Left err -> (False, err)
|
||||||
Right _ -> (True, e)
|
Right _ -> (True, e)
|
||||||
|
@ -81,4 +77,7 @@ moveFile src dest = tryIO (R.rename src dest) >>= onrename
|
||||||
case r of
|
case r of
|
||||||
(Left _) -> return False
|
(Left _) -> return False
|
||||||
(Right s) -> return $ isDirectory s
|
(Right s) -> return $ isDirectory s
|
||||||
|
|
||||||
|
copyright :: Copyright
|
||||||
|
copyright = author JoeyHess (2022-11)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue