From: sof Date: Wed, 24 Apr 2002 15:47:10 +0000 (+0000) Subject: [project @ 2002-04-24 15:47:10 by sof] X-Git-Tag: nhc98-1-18-release~1058 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a3a668c2abbc3218d48f4ea836380a4e31f1e642;p=haskell-directory.git [project @ 2002-04-24 15:47:10 by sof] Directory.Permissions.searchable: True iff S_ISDIR() and X bit set (was : !S_ISREG() and X) -- falls into line with what nhc98 and Hugs does --- diff --git a/System/Directory.hs b/System/Directory.hs index d487294..b6047a9 100644 --- a/System/Directory.hs +++ b/System/Directory.hs @@ -8,7 +8,7 @@ -- Stability : provisional -- Portability : portable -- --- $Id: Directory.hs,v 1.1 2002/02/05 17:32:27 simonmar Exp $ +-- $Id: Directory.hs,v 1.2 2002/04/24 15:47:10 sof Exp $ -- -- System-independent interface to directory manipulation. -- @@ -470,13 +470,12 @@ getPermissions name = do exec <- c_access s x_OK withFileStatus name $ \st -> do is_dir <- isDirectory st - is_reg <- isRegularFile st return ( Permissions { readable = read == 0, writable = write == 0, executable = not is_dir && exec == 0, - searchable = not is_reg && exec == 0 + searchable = is_dir && exec == 0 } ) @@ -516,11 +515,6 @@ isDirectory stat = do mode <- st_mode stat return (s_isdir mode) -isRegularFile :: Ptr CStat -> IO Bool -isRegularFile stat = do - mode <- st_mode stat - return (s_isreg mode) - emptyCMode :: CMode emptyCMode = 0