From d9cbdf43fe6ce971d9b5a99e60a70055f67b1ed3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 7 Jul 2015 14:48:23 -0400 Subject: import: Fix failure of cross-device import on Windows. As well as import, 2 other places ran "mv" manually, so changed them to use moveFile as well. --- Command/Reinject.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Command/Reinject.hs') diff --git a/Command/Reinject.hs b/Command/Reinject.hs index 2c785feb6..de7f6eb3d 100644 --- a/Command/Reinject.hs +++ b/Command/Reinject.hs @@ -50,11 +50,13 @@ perform src dest key = do ) where -- the file might be on a different filesystem, - -- so mv is used rather than simply calling + -- so moveFile is used rather than simply calling -- moveToObjectDir; disk space is also -- checked this way. move = getViaTmp key $ \tmp -> - liftIO $ boolSystem "mv" [File src, File tmp] + liftIO $ catchBoolIO $ do + moveFile src tmp + return True reject = const $ return "wrong file?" cleanup :: Key -> CommandCleanup -- cgit v1.2.3