[project @ 2001-02-13 15:23:33 by rrt]
[ghc-hetmet.git] / ghc / lib / std / Directory.hsc
index 2672fea..36e4d18 100644 (file)
@@ -1,5 +1,5 @@
 -- -----------------------------------------------------------------------------
--- $Id: Directory.hsc,v 1.3 2001/01/12 17:45:30 qrczak Exp $
+-- $Id: Directory.hsc,v 1.5 2001/02/13 15:23:33 rrt Exp $
 --
 -- (c) The University of Glasgow, 1994-2000
 --
@@ -207,7 +207,7 @@ removeFile path = do
       throwErrnoIfMinus1Retry_ "removeFile" (unlink s)
 
 {-
-@renameDirectory old@ {\em new} changes the name of an existing
+@renameDirectory@ {\em old} {\em new} changes the name of an existing
 directory from {\em old} to {\em new}.  If the {\em new} directory
 already exists, it is atomically replaced by the {\em old} directory.
 If the {\em new} directory is neither the {\em old} directory nor an
@@ -354,9 +354,9 @@ getDirectoryContents path = do
         else do errno <- getErrno
                 if (errno == eINTR) then loop dir else do
                 throwErrnoIfMinus1_ "getDirectoryContents" $ closedir dir
-                if (isValidErrno errno) -- EOF
-                   then throwErrno "getDirectoryContents"
-                   else return []
+                if (errno == eOK)
+                   then return []
+                   else throwErrno "getDirectoryContents"
 
 {-
 If the operating system has a notion of current directories,