diff --git a/cabal-install/Distribution/Client/BuildTarget.hs b/cabal-install/Distribution/Client/BuildTarget.hs index 1fe25b1c217..11a3b7d6816 100644 --- a/cabal-install/Distribution/Client/BuildTarget.hs +++ b/cabal-install/Distribution/Client/BuildTarget.hs @@ -104,10 +104,10 @@ import System.FilePath as FilePath ( takeExtension, dropExtension , splitDirectories, joinPath, splitPath ) import System.Directory - ( doesFileExist, doesDirectoryExist, canonicalizePath - , getCurrentDirectory ) + ( doesFileExist, doesDirectoryExist, getCurrentDirectory ) +import qualified System.Directory (canonicalizePath) import System.FilePath - ( (), (<.>), normalise ) + ( (), (<.>), normalise, dropTrailingPathSeparator ) import Text.EditDistance ( defaultEditCosts, restrictedDamerauLevenshteinDistance ) @@ -1810,6 +1810,11 @@ matchInexactly cannonicalise key xs = caseFold :: String -> String caseFold = lowercase +-- | Workaround for +canonicalizePath :: FilePath -> IO FilePath +canonicalizePath = + System.Directory.canonicalizePath . dropTrailingPathSeparator + ------------------------------ -- Example inputs