From: Ian Lynagh Date: Sun, 13 Jun 2010 13:42:35 +0000 (+0000) Subject: Check for a NULL result from realpath; fixes #4113 on non-Windows X-Git-Tag: ghc-darcs-git-switchover~7 X-Git-Url: http://git.megacz.com/?p=haskell-directory.git;a=commitdiff_plain;h=96d347838b02abf9eb9879239af5962cb22a7d32 Check for a NULL result from realpath; fixes #4113 on non-Windows --- diff --git a/System/Directory.hs b/System/Directory.hs index 2f3cb25..688a10b 100644 --- a/System/Directory.hs +++ b/System/Directory.hs @@ -685,7 +685,7 @@ canonicalizePath fpath = #else withCString fpath $ \pInPath -> allocaBytes long_path_size $ \pOutPath -> - do c_realpath pInPath pOutPath + do throwErrnoPathIfNull "canonicalizePath" fpath $ c_realpath pInPath pOutPath path <- peekCString pOutPath #endif return (normalise path)