diff --git a/System/Directory.hs b/System/Directory.hs
--- a/System/Directory.hs
+++ b/System/Directory.hs
@@ -685,7 +685,7 @@
 #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)
diff --git a/directory.cabal b/directory.cabal
--- a/directory.cabal
+++ b/directory.cabal
@@ -1,5 +1,5 @@
 name:		directory
-version:	1.0.1.1
+version:	1.0.1.2
 license:	BSD3
 license-file:	LICENSE
 maintainer:	libraries@haskell.org
@@ -30,9 +30,9 @@
     includes: HsDirectory.h
     install-includes: HsDirectory.h HsDirectoryConfig.h
     extensions: CPP, ForeignFunctionInterface
-    build-depends: base >= 4.1 && < 4.3,
+    build-depends: base >= 4.2 && < 4.4,
                    old-time >= 1.0 && < 1.1,
-                   filepath >= 1.1 && < 1.2
+                   filepath >= 1.1 && < 1.3
     if !impl(nhc98) {
       if os(windows) {
           build-depends: Win32
