[commit: ghc] wip/nfs-locking: Don't unify paths as it seems prone to surprises. (a849c93)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:03:55 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/a849c93a1f092e6c611d1bd4fae68b91612bfadb/ghc

>---------------------------------------------------------------

commit a849c93a1f092e6c611d1bd4fae68b91612bfadb
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Tue Feb 16 23:09:34 2016 +0000

    Don't unify paths as it seems prone to surprises.


>---------------------------------------------------------------

a849c93a1f092e6c611d1bd4fae68b91612bfadb
 src/Base.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Base.hs b/src/Base.hs
index 372ec78..769fdc4 100644
--- a/src/Base.hs
+++ b/src/Base.hs
@@ -183,7 +183,7 @@ removeDirectoryIfExists d =
 -- comprising digits (@0-9@), dashes (@-@), and dots (@.@). Examples:
 --
 --- * @'matchVersionedFilePath' "foo/bar"  ".a" "foo/bar.a"     '==' 'True'@
---- * @'matchVersionedFilePath' "foo/bar"  ".a" "foo\bar.a"     '==' 'True'@
+--- * @'matchVersionedFilePath' "foo/bar"  ".a" "foo\bar.a"     '==' 'False'@
 --- * @'matchVersionedFilePath' "foo/bar"  "a"  "foo/bar.a"     '==' 'True'@
 --- * @'matchVersionedFilePath' "foo/bar"  ""   "foo/bar.a"     '==' 'False'@
 --- * @'matchVersionedFilePath' "foo/bar"  "a"  "foo/bar-0.1.a" '==' 'True'@
@@ -191,6 +191,6 @@ removeDirectoryIfExists d =
 --- * @'matchVersionedFilePath' "foo/bar/" "a"  "foo/bar-0.1.a" '==' 'False'@
 matchVersionedFilePath :: String -> String -> FilePath -> Bool
 matchVersionedFilePath prefix suffix filePath =
-    case stripPrefix prefix (unifyPath filePath) >>= stripSuffix suffix of
+    case stripPrefix prefix filePath >>= stripSuffix suffix of
         Nothing      -> False
         Just version -> all (\c -> isDigit c || c == '-' || c == '.') version



More information about the ghc-commits mailing list