aboutsummaryrefslogtreecommitdiff
path: root/src/HaskellCodeExplorer
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-06-08 11:41:00 +1000
committerYuchen Pei <hi@ypei.me>2022-06-08 11:41:00 +1000
commit014057f68716515a50ab79ba8c17af3a4dc2bea4 (patch)
tree75e421c5a709f16b1c74f79e5cea921fbdff9d92 /src/HaskellCodeExplorer
parent873b9cba0285d03d7cd5dcf0006fe3262bbf33ad (diff)
fixing path resolution
Diffstat (limited to 'src/HaskellCodeExplorer')
-rw-r--r--src/HaskellCodeExplorer/PackageInfo.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/HaskellCodeExplorer/PackageInfo.hs b/src/HaskellCodeExplorer/PackageInfo.hs
index 4fe22ea..bb7455a 100644
--- a/src/HaskellCodeExplorer/PackageInfo.hs
+++ b/src/HaskellCodeExplorer/PackageInfo.hs
@@ -122,6 +122,7 @@ import System.Directory
, getCurrentDirectory
, makeAbsolute
, getDirectoryContents
+ , canonicalizePath
)
import qualified System.Directory.Tree as DT
import System.Exit (exitFailure)
@@ -195,8 +196,9 @@ createPackageInfo packageDirectoryPath mbDistDirRelativePath sourceCodePreproces
mbPackage <- liftIO $
findM
(\pkg -> do
- dir <- (fmap (</> "") . fmap normalise . makeAbsolute . pSourceDir) pkg
- return $ dir == packageDirectoryAbsPath </> "")
+ dir1 <- (canonicalizePath . pSourceDir) pkg
+ dir2 <- canonicalizePath packageDirectoryAbsPath
+ return $ dir1 == dir2)
packages
package <-
case mbPackage of