Commit 78ccb906 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Revert commit '5c46e785'.

Make it more clear why that call is necessary.
parent 5c46e785
......@@ -29,7 +29,7 @@ module Distribution.Client.Install (
) where
import Data.List
( unfoldr, nub, sort, (\\) )
( isPrefixOf, unfoldr, nub, sort, (\\) )
import qualified Data.Set as S
import Data.Maybe
( isJust, fromMaybe, maybeToList )
......@@ -1193,10 +1193,13 @@ installLocalTarballPackage verbosity jobLimit pkgid
distDirExists <- doesDirectoryExist distDirPath
when (distDirExists && distDirPath /= distDirPathNew) $ do
-- NB: we need to handle the case when 'distDirPathNew' is a
-- subdirectory of 'distDirPath' (e.g. 'dist/dist-sandbox-3688fbc2').
-- subdirectory of 'distDirPath' (e.g. the former is
-- 'dist/dist-sandbox-3688fbc2' and the latter is 'dist').
debug verbosity $ "Renaming '" ++ distDirPath ++ "' to '"
++ distDirPathTmp ++ "'."
renameDirectory distDirPath distDirPathTmp
when (distDirPath `isPrefixOf` distDirPathNew) $
createDirectoryIfMissingVerbose verbosity False distDirPath
debug verbosity $ "Renaming '" ++ distDirPathTmp ++ "' to '"
++ distDirPathNew ++ "'."
renameDirectory distDirPathTmp distDirPathNew
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment