Commit 4d9f13f0 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #1960 from sardonicpresence/fix1698

#1698 - Don't attempt to rename dist if it is already named correctly
parents 680b4439 e0c9fec8
......@@ -1191,7 +1191,7 @@ installLocalTarballPackage verbosity jobLimit pkgid
distDirPathTmp = absUnpackedPath </> (defaultDistPref ++ "-tmp")
distDirPathNew = absUnpackedPath </> distPref
distDirExists <- doesDirectoryExist distDirPath
when distDirExists $ do
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').
debug verbosity $ "Renaming '" ++ distDirPath ++ "' to '"
......
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