packages feed

tar 0.4.0.0 → 0.4.0.1

raw patch · 3 files changed

+21/−3 lines, 3 filesdep +timedep ~directory

Dependencies added: time

Dependency ranges changed: directory

Files

Codec/Archive/Tar/Pack.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module      :  Codec.Archive.Tar@@ -28,8 +29,16 @@ import System.Directory          ( getDirectoryContents, doesDirectoryExist, getModificationTime          , Permissions(..), getPermissions )+#if MIN_VERSION_directory(1,2,0)+-- The directory package switched to the new time package+import Data.Time.Clock+         ( UTCTime )+import Data.Time.Clock.POSIX+         ( utcTimeToPOSIXSeconds )+#else import System.Time          ( ClockTime(..) )+#endif import System.IO          ( IOMode(ReadMode), openBinaryFile, hFileSize ) import System.IO.Unsafe (unsafeInterleaveIO)@@ -170,5 +179,11 @@  getModTime :: FilePath -> IO EpochTime getModTime path = do+#if MIN_VERSION_directory(1,2,0)+  -- The directory package switched to the new time package+  t <- getModificationTime path+  return . floor . utcTimeToPOSIXSeconds $ t+#else   (TOD s _) <- getModificationTime path   return $! fromIntegral s+#endif
Codec/Archive/Tar/Types.hs view
@@ -120,6 +120,7 @@                   | BlockDevice     !DevMajor !DevMinor                   | NamedPipe                   | OtherEntryType  !TypeCode ByteString !FileSize+    deriving (Eq, Ord)  data Ownership = Ownership {     -- | The owner user name. Should be set to @\"\"@ if unknown.@@ -134,6 +135,7 @@     -- | Numeric owner group id. Should be set to @0@ if unknown.     groupId :: !Int   }+    deriving (Eq, Ord)  -- | There have been a number of extensions to the tar file format over the -- years. They all share the basic entry fields and put more meta-data in@@ -156,7 +158,7 @@      -- archives the standard USTAR/POSIX should be used.      --    | GnuFormat-  deriving Eq+  deriving (Eq, Ord)  -- | @rw-r--r--@ for normal files ordinaryFilePermissions :: Permissions
tar.cabal view
@@ -1,5 +1,5 @@ name:            tar-version:         0.4.0.0+version:         0.4.0.1 license:         BSD3 license-file:    LICENSE author:          Bjorn Bringert <bjorn@bringert.net>@@ -25,7 +25,8 @@  library   build-depends: base >= 3 && < 5, filepath,-                 directory, old-time, bytestring+                 bytestring, directory,+                 old-time, time    exposed-modules:     Codec.Archive.Tar