Open
Description
Describe the bug
if adding one directory to a SevenZipFile, some files format like ".csv" or ".tiff"files in the directory is damaged.
but if writing a SevenzipFile with the directory , files written successfully, no problem to open
Related issue
(if exist)
To Reproduce
Steps to reproduce the behavior:
(example)
- writing one file to to a SevenZipFile named demo.7z
- add one directory or more directories to demo.7z
- code:
import py7zr
out_file = r"D:/test/tmp/test/a/demo.7z"
with py7zr.SevenZipFile(out_file, 'w', password=None) as z:
z.write(r"D:/test/tmp/test/a.xlsx", arcname="a.xlsx")
with py7zr.SevenZipFile(out_file, 'a', password=None) as z:
z.writeall(r"D:/test/tmp/tmp/22", arcname="22")
- res
program run success , but some files like "a.csv" can not open.
raise Error:Unknown format or incorrect password
but if writing the directory ,file open successfully
Expected behavior
expect: it can work well as mode"w"
Environment (please complete the following information):
- OS: OS: Windows 10, 64-bit
- Python 3.7.0
- py7zr version: 0.17.2
Test data(please attach in the report):
source file here
demo.zip
Additional context
Add any other context about the problem here.