Closed RKrahl closed 5 years ago
When creating an archive with relative paths, all paths must start with basedir. This is verified. But it is not verified that basedir is a directory:
basedir
>>> p = Path("msg.txt") >>> p.is_file() True >>> archive = Archive("archive.tar", mode="x:", paths=[p], basedir=p)
This pathologic case even produces a corrupt archive that cannot be extracted:
$ tar tvf archive.tar -r--r--r-- rolf/users 262 2019-02-10 21:26 msg.txt/.manifest.yaml -rw-r--r-- rolf/users 7 2019-02-10 21:13 msg.txt $ tar xf archive.tar tar: msg.txt: Cannot open: File exists tar: Exiting with failure status due to previous errors
When creating an archive with relative paths, all paths must start with
basedir
. This is verified. But it is not verified thatbasedir
is a directory:This pathologic case even produces a corrupt archive that cannot be extracted: