TESTS: fix normalDirPerms

This commit is contained in:
Julian Ospald 2016-05-02 19:54:47 +02:00
parent c76c27288d
commit 3e5777bf3a
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -29,8 +29,7 @@ import System.Exit
import System.Process import System.Process
import System.Posix.Files.ByteString import System.Posix.Files.ByteString
( (
accessModes groupExecuteMode
, groupExecuteMode
, groupReadMode , groupReadMode
, nullFileMode , nullFileMode
, otherExecuteMode , otherExecuteMode
@ -44,7 +43,6 @@ import System.Posix.Files.ByteString
-- TODO: chardev, blockdev, namedpipe, socket -- TODO: chardev, blockdev, namedpipe, socket
-- TODO: no permission to open input file/dir
main :: IO () main :: IO ()
@ -596,5 +594,5 @@ normalDirPerms :: ByteString -> IO ()
normalDirPerms path = do normalDirPerms path = do
pwd <- fromJust <$> getEnv "PWD" >>= P.parseAbs pwd <- fromJust <$> getEnv "PWD" >>= P.parseAbs
file <- (pwd P.</>) <$> P.parseRel path file <- (pwd P.</>) <$> P.parseRel path
setFileMode (P.fromAbs file) accessModes setFileMode (P.fromAbs file) newDirPerms