mirror of https://github.com/voidlizard/hbs2
wip27
This commit is contained in:
parent
1f1c9be9df
commit
77fb8f419d
|
@ -1213,14 +1213,18 @@ theDict = do
|
||||||
let (prefix,name) = L.splitAt 2 gitHash
|
let (prefix,name) = L.splitAt 2 gitHash
|
||||||
let path = joinPath [d, "objects", prefix, name]
|
let path = joinPath [d, "objects", prefix, name]
|
||||||
|
|
||||||
touch path
|
here <- doesPathExist path
|
||||||
|
|
||||||
liftIO $ print $ pretty t <+> pretty s <+> pretty h <+> pretty path
|
unless here do
|
||||||
|
|
||||||
let params = Zlib.defaultCompressParams { Zlib.compressMethod = Zlib.deflateMethod }
|
touch path
|
||||||
UIO.withBinaryFileAtomic path WriteMode $ \fh -> do
|
|
||||||
let contents = Zlib.compressWith params (signature <> body)
|
liftIO $ print $ pretty t <+> pretty s <+> pretty h <+> pretty path
|
||||||
LBS.hPutStr fh contents
|
|
||||||
|
let params = Zlib.defaultCompressParams { Zlib.compressMethod = Zlib.deflateMethod }
|
||||||
|
UIO.withBinaryFileAtomic path WriteMode $ \fh -> do
|
||||||
|
let contents = Zlib.compressWith params (signature <> body)
|
||||||
|
LBS.hPutStr fh contents
|
||||||
|
|
||||||
pure True
|
pure True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue