[commit: ghc] wip/nfs-locking: Actions: use `mv` instead of renameDirectory (fixes #236) (d04a83f)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:59:10 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/d04a83ffa5a94de6215997229c6e4dc0afe21640/ghc
>---------------------------------------------------------------
commit d04a83ffa5a94de6215997229c6e4dc0afe21640
Author: Michal Terepeta <michal.terepeta at gmail.com>
Date: Thu May 5 17:05:24 2016 +0200
Actions: use `mv` instead of renameDirectory (fixes #236)
Implementing `moveDirectory` by calling into `renameDirectory` is
problematic because it doesn't work across file-systems (e.g., a
tmpfs based `/tmp`).
This fixes the problem by calling into `mv` instead (similarly to
what we do for `copyDirectory`).
>---------------------------------------------------------------
d04a83ffa5a94de6215997229c6e4dc0afe21640
src/Rules/Actions.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Rules/Actions.hs b/src/Rules/Actions.hs
index 9a9e51e..fd117ae 100644
--- a/src/Rules/Actions.hs
+++ b/src/Rules/Actions.hs
@@ -124,7 +124,7 @@ copyDirectory source target = do
moveDirectory :: FilePath -> FilePath -> Action ()
moveDirectory source target = do
putProgressInfo $ renderAction "Move directory" source target
- liftIO $ IO.renameDirectory source target
+ quietly $ cmd (EchoStdout False) ["mv", source, target]
-- | Transform a given file by applying a function to its contents.
fixFile :: FilePath -> (String -> String) -> Action ()
More information about the ghc-commits
mailing list