From 96d347838b02abf9eb9879239af5962cb22a7d32 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sun, 13 Jun 2010 13:42:35 +0000 Subject: [PATCH] Check for a NULL result from realpath; fixes #4113 on non-Windows --- System/Directory.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 1.7.10.4