windows build fix
authorJoey Hess <joeyh@joeyh.name>
Tue, 26 Mar 2024 17:51:51 +0000 (13:51 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 26 Mar 2024 17:51:51 +0000 (13:51 -0400)
Utility/MoveFile.hs

index 9f17bc87cc67aa59ff4e22aa14a6a130e7a6e8b8..1609c8510909f109ee685a917dc302513ac3688b 100644 (file)
@@ -31,9 +31,6 @@ import Utility.FileSystemEncoding
 import qualified Utility.RawFilePath as R
 import Author
 
-copyright :: Copyright
-copyright = author JoeyHess (2022-11)
-
 {- Moves one filename to another.
  - First tries a rename, but falls back to moving across devices if needed. -}
 moveFile :: RawFilePath -> RawFilePath -> IO ()
@@ -64,8 +61,7 @@ moveFile src dest = tryIO (R.rename src dest) >>= onrename
                                ]
                        let e' = e
 #else
-                       r <- tryIO $ copyright
-                               =<< copyFile (fromRawFilePath src) tmp
+                       r <- tryIO $ copyFile (fromRawFilePath src) tmp
                        let (ok, e') = case r of
                                Left err -> (False, err)
                                Right _ -> (True, e)
@@ -81,4 +77,7 @@ moveFile src dest = tryIO (R.rename src dest) >>= onrename
                case r of
                        (Left _) -> return False
                        (Right s) -> return $ isDirectory s
+
+copyright :: Copyright
+copyright = author JoeyHess (2022-11)
 #endif