The following is not working as I am expecting it to. Am I doing anything wrong?
prepareZipFile :: FilePath -> IO FilePath
prepareZipFile dir = do
Zip.createArchive zipFileName $ Zip.packDirRecur Zip.Deflate createSelector dir
pure zipFileName
where
zipFileName = "/tmp/upload.zip"
createSelector fpath = do
s <- Zip.mkEntrySelector fpath
Zip.setExternalFileAttrs ((0x100000 .|. 0o0755) `shiftL` 16) s
-- fmode <- liftIO $ (fmap Unix.fileMode $ Unix.getFileStatus $ dir <> "/" <> fpath)
-- Zip.setExternalFileAttrs (traceShowId $ fromIntegral $ (toInteger fmode) `shiftL` 16) s
pure s
The following is not working as I am expecting it to. Am I doing anything wrong?