Commit cd817001 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Use 'equalFilePath' instead of '/='.

parent 78ccb906
......@@ -50,7 +50,7 @@ import System.Directory
( getTemporaryDirectory, doesDirectoryExist, doesFileExist,
createDirectoryIfMissing, removeFile, renameDirectory )
import System.FilePath
( (</>), (<.>), takeDirectory )
( (</>), (<.>), equalFilePath, takeDirectory )
import System.IO
( openFile, IOMode(AppendMode), hClose )
import System.IO.Error
......@@ -1191,7 +1191,8 @@ installLocalTarballPackage verbosity jobLimit pkgid
distDirPathTmp = absUnpackedPath </> (defaultDistPref ++ "-tmp")
distDirPathNew = absUnpackedPath </> distPref
distDirExists <- doesDirectoryExist distDirPath
when (distDirExists && distDirPath /= distDirPathNew) $ do
when (distDirExists
&& (not $ distDirPath `equalFilePath` distDirPathNew)) $ do
-- NB: we need to handle the case when 'distDirPathNew' is a
-- subdirectory of 'distDirPath' (e.g. the former is
-- 'dist/dist-sandbox-3688fbc2' and the latter is 'dist').
......
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