packages feed

ztar 0.0.3 → 0.1.0

raw patch · 3 files changed

+18/−8 lines, 3 filesdep ~zip

Dependency ranges changed: zip

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+# ztar 0.1.0++Breaking changes:+* Works against zip-0.2.0, will revert in 0.2.0+ # ztar 0.0.3  Breaking changes:
src/Codec/Archive/ZTar/Zip.hs view
@@ -21,12 +21,13 @@ import Control.Monad.IO.Class (liftIO) import Data.ByteString.Lazy (ByteString) import qualified Data.ByteString.Lazy as BS+import Path (parseAbsFile, parseAbsDir, parseRelFile) import System.Directory     ( createDirectoryIfMissing     , doesFileExist     , doesDirectoryExist     , listDirectory-    , renameFile+    , makeAbsolute     , withCurrentDirectory     ) import System.FilePath ((</>))@@ -45,8 +46,8 @@        -> [FilePath] -- ^ files and paths to compress, relative to base directory        -> IO () create archive base paths = do-  withCurrentDirectory base $ Zip.createArchive archive $ mapM_ insert paths-  renameFile (base </> archive) archive+  archive' <- makeAbsolute archive >>= parseAbsFile+  withCurrentDirectory base $ Zip.createArchive archive' $ mapM_ insert paths   where     insert path = do       isFile <- liftIO $ doesFileExist path@@ -56,8 +57,9 @@         | isDir -> insertDir path         | otherwise -> fail $ "Path does not exist: " ++ path     insertFile path = do-      path' <- Zip.mkEntrySelector path-      Zip.loadEntry Zip.BZip2 path' path+      path' <- parseRelFile path+      path'' <- Zip.mkEntrySelector path'+      Zip.loadEntry Zip.BZip2 (const $ return path'') path'     insertDir path =       let mkPath = if path == "." then id else (path </>)       in mapM_ (insert . mkPath) =<< liftIO (listDirectory path)@@ -72,4 +74,6 @@         -> IO () extract dir archive = do   createDirectoryIfMissing True dir-  Zip.withArchive archive $ Zip.unpackInto dir+  archive' <- makeAbsolute archive >>= parseAbsFile+  dir' <- makeAbsolute dir >>= parseAbsDir+  Zip.withArchive archive' $ Zip.unpackInto dir'
ztar.cabal view
@@ -1,5 +1,5 @@ name:                ztar-version:             0.0.3+version:             0.1.0 license:             BSD3 license-file:        LICENSE.md author:              Brandon Chinn <brandonchinn178@gmail.com>@@ -31,8 +31,9 @@                     , bytestring >= 0.10.8 && < 0.11                     , directory >= 1.3 && < 1.4                     , filepath >= 1.4.1 && < 1.5+                    , path                     , tar >= 0.5 && < 0.6-                    , zip >= 1.0 && < 1.2+                    , zip >= 0.2 && < 0.3                     , zlib >= 0.6 && < 0.7   ghc-options: -Wall   if flag(dev)