MissingH 1.2.0.1 → 1.2.0.2
raw patch · 2 files changed
+10/−1 lines, 2 filesdep ~directoryPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: directory
API changes (from Hackage documentation)
Files
- MissingH.cabal +1/−1
- src/System/IO/WindowsCompat.hs +9/−0
MissingH.cabal view
@@ -1,5 +1,5 @@ Name: MissingH-Version: 1.2.0.1+Version: 1.2.0.2 License: BSD3 Maintainer: John Goerzen <jgoerzen@complete.org> Author: John Goerzen
src/System/IO/WindowsCompat.hs view
@@ -56,6 +56,8 @@ import System.Posix.Consts import System.Time.Utils import System.Directory+import Data.Time+import Data.Time.Clock.POSIX -- these types aren't defined here @@ -112,6 +114,9 @@ accessModes :: FileMode accessModes = ownerModes .|. groupModes .|. otherModes +utcTimeToSeconds :: Num a => UTCTime -> a+utcTimeToSeconds = fromInteger . floor . utcTimeToPOSIXSeconds+ ----------- stat type FileStatus = FileStatusCompat getFileStatus :: FilePath -> IO FileStatus@@ -120,7 +125,11 @@ isdir <- doesDirectoryExist fp perms <- getPermissions fp modct <- getModificationTime fp+#if MIN_VERSION_directory(1,2,0)+ let epochtime = utcTimeToSeconds modct+#else let epochtime = clockTimeToEpoch modct+#endif return $ FileStatusCompat {deviceID = -1, fileID = -1, fileMode = if isfile then regularFileMode