packages feed

zip 1.0.0 → 1.1.0

raw patch · 6 files changed

+32/−12 lines, 6 files

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## Zip 1.1.0++* Made `saveEntry` and `unpackInto` restore modification time of files.+ ## Zip 1.0.0  * Works with `conduit-1.3.0`, `conduit-extra-1.3.0`, `resourcet-1.2.0` and
Codec/Archive/Zip.hs view
@@ -352,7 +352,10 @@   :: EntrySelector     -- ^ Selector that identifies archive entry   -> FilePath          -- ^ Where to save the file   -> ZipArchive ()-saveEntry s path = sourceEntry s (CB.sinkFile path)+saveEntry s path = do+  sourceEntry s (CB.sinkFile path)+  med <- getEntryDesc s+  forM_ med (liftIO . setModificationTime path . edModTime)  -- | Calculate CRC32 check sum and compare it with the value read from the -- archive. The function returns 'True' when the check sums are the
Codec/Archive/Zip/Internal.hs view
@@ -948,7 +948,11 @@  fromVersion :: Version -> Word16 fromVersion v = fromIntegral (major * 10 + minor)-  where (major:minor:_) = versionBranch v ++ repeat 0+  where (major,minor) =+          case versionBranch v of+            v0:v1:_ -> (v0, v1)+            v0:_    -> (v0, 0)+            []      -> (0,  0)  -- | Get compression method form its numeric representation. 
README.md view
@@ -5,7 +5,6 @@ [![Stackage Nightly](http://stackage.org/package/zip/badge/nightly)](http://stackage.org/nightly/package/zip) [![Stackage LTS](http://stackage.org/package/zip/badge/lts)](http://stackage.org/lts/package/zip) [![Build Status](https://travis-ci.org/mrkkrp/zip.svg?branch=master)](https://travis-ci.org/mrkkrp/zip)-[![Coverage Status](https://coveralls.io/repos/mrkkrp/zip/badge.svg?branch=master&service=github)](https://coveralls.io/github/mrkkrp/zip?branch=master)  * [Why this library is written](#why-this-library-is-written)     * [zip-archive](#zip-archive)
tests/Main.hs view
@@ -15,7 +15,6 @@ import Data.List (intercalate) import Data.Map (Map, (!)) import Data.Maybe (fromJust)-import Data.Monoid import Data.Text (Text) import Data.Time import Data.Version@@ -38,6 +37,10 @@ import qualified Data.Text.Encoding      as T import qualified System.FilePath         as FP +#if !MIN_VERSION_base(4,11,0)+import Data.Monoid+#endif+ -- | Zip tests. Please note that Zip64 feature is not currently tested -- automatically because for it to expose itself we need > 4GB of -- data. Handling such quantities of data locally is problematic and even@@ -359,15 +362,18 @@ loadEntrySpec :: SpecWith FilePath loadEntrySpec =   context "when an entry is loaded" $-    it "is there" $ \path -> property $ \m b s -> do+    it "is there" $ \path -> property $ \m b s t -> do       let vpath = deriveVacant path       B.writeFile vpath b+      setModificationTime vpath t       createArchive path $ do         loadEntry m s vpath         commit         liftIO (removeFile vpath)         saveEntry s vpath       B.readFile vpath `shouldReturn` b+      modTime <- getModificationTime vpath+      modTime `shouldSatisfy` isCloseTo t  copyEntrySpec :: SpecWith FilePath copyEntrySpec =
zip.cabal view
@@ -1,7 +1,7 @@ name:                 zip-version:              1.0.0-cabal-version:        >= 1.18-tested-with:          GHC==8.0.2, GHC==8.2.2+version:              1.1.0+cabal-version:        1.18+tested-with:          GHC==8.0.2, GHC==8.2.2, GHC==8.4.2 license:              BSD3 license-file:         LICENSE.md author:               Mark Karpov <markkarpov92@gmail.com>@@ -32,7 +32,7 @@                     , digest           < 0.1                     , directory        >= 1.2.2   && < 1.4                     , dlist            >= 0.8     && < 0.9-                    , exceptions       >= 0.6     && < 0.9+                    , exceptions       >= 0.6     && < 0.11                     , filepath         >= 1.2     && < 1.5                     , monad-control    >= 1.0     && < 1.1                     , mtl              >= 2.0     && < 3.0@@ -50,7 +50,11 @@   other-modules:      Codec.Archive.Zip.Internal                     , Codec.Archive.Zip.Type   if flag(dev)-    ghc-options:      -O0 -Wall -Werror+    ghc-options:      -O0 -Wall -Werror -Wcompat+                      -Wincomplete-record-updates+                      -Wincomplete-uni-patterns+                      -Wnoncanonical-monad-instances+                      -Wnoncanonical-monadfail-instances   else     ghc-options:      -O2 -Wall   default-language:   Haskell2010@@ -66,10 +70,10 @@                     , containers       >= 0.5.6.2 && < 0.6                     , directory        >= 1.2.2   && < 1.4                     , dlist            >= 0.8     && < 0.9-                    , exceptions       >= 0.6     && < 0.9+                    , exceptions       >= 0.6     && < 0.11                     , filepath         >= 1.2     && < 1.5                     , hspec            >= 2.0     && < 3.0-                    , temporary        >= 1.1     && < 1.3+                    , temporary        >= 1.1     && < 1.4                     , text             >= 0.2     && < 1.3                     , time             >= 1.4     && < 1.9                     , transformers     >= 0.4     && < 0.6