Commit 34c7d12a authored by ijones's avatar ijones
Browse files

messing with permissions support (simonMar please check)

parent 3d48c228
......@@ -96,7 +96,10 @@ import System.Directory (getDirectoryContents, removeDirectory,
createDirectory)
import Foreign.Marshal (allocaBytes)
#ifndef mingw32_TARGET_OS
import System.Posix.Files (getFileStatus, accessTime, modificationTime, setFileTimes, fileMode, setFileMode)
#endif
#ifdef DEBUG
import HUnit ((~:), (~=?), Test(..), assertEqual)
......@@ -390,9 +393,16 @@ pathJoin :: [String] -> FilePath
pathJoin = concat . intersperse pathSeparatorStr
copyPermissions :: FilePath -> FilePath -> IO ()
#ifndef mingw32_TARGET_OS
copyPermissions src dest
= do srcStatus <- getFileStatus src
setFileMode dest (fileMode srcStatus)
#else
copyPermissions src dest
= getPermissions src >>= setPermissions dest
#endif
copyFileTimes :: FilePath -> FilePath -> IO ()
#ifndef mingw32_TARGET_OS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment