[commit: packages/directory] master: Fixes throwErrnoPathIfNull ommission in d1d3528 (933e173)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 11:37:36 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/933e1737cf2c46c300a0d5362f3175b61762c5cd/directory

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

commit 933e1737cf2c46c300a0d5362f3175b61762c5cd
Author: Elliot Robinson <elliot.robinson at argiopetech.com>
Date:   Sun Feb 22 15:06:14 2015 -0500

    Fixes throwErrnoPathIfNull ommission in d1d3528


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

933e1737cf2c46c300a0d5362f3175b61762c5cd
 System/Directory.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/System/Directory.hs b/System/Directory.hs
index 0a24e11..7cbaa50 100644
--- a/System/Directory.hs
+++ b/System/Directory.hs
@@ -748,7 +748,7 @@ canonicalizePath fpath =
   do enc <- getFileSystemEncoding
      GHC.withCString enc fpath $ \pInPath ->
        allocaBytes long_path_size $ \pOutPath ->
-         do _ <-c_realpath pInPath pOutPath
+         do _ <- throwErrnoPathIfNull "canonicalizePath" fpath $ c_realpath pInPath pOutPath
 
             -- NB: pOutPath will be passed thru as result pointer by c_realpath
             path <- GHC.peekCString enc pOutPath



More information about the ghc-commits mailing list