Repository navigation
v0.9.5
Fixed
- Archive member names are normalized, so the same member is reachable
however the archive was written and whichever format it is. A leading
./(whattar -C dir .,TarFile.add(arcname=".")and
shutil.make_archiveput on every member), empty segments (a//b) and
interior./..(a/./b,a/b/../c) now resolve to one name for
listing and lookup alike. Previously onlytar:stripped a leading./:
a zip written that way listed as empty and none of its members could be
read under any spelling, while a name such asd//e.txtwas readable but
absent from listings.
Changed
- A drive- or backslash-shaped member name is no longer dropped.
C:drive.txtanda\bare ordinary filenames on POSIX, and an archive
written there may contain them; they were silently absent from every
listing and unreadable on every platform. The rule they were failing is a
destination rule, and now lives where the joining happens:
Path.copy(recursive=True)refuses a child name that would not stay
inside its target (ValueErrorthroughignore_error), which is what
PathSyncerandutils.unpack_archive()already did per destination.
Copying such a member onto a Windows path is still refused; copying it to
a POSIX path, aMemPathor another archive now works. - A member name that escapes the archive root (
../x,/abs, a
..with nothing left to consume) has no name inside the archive: it was
already never listed, and is now never readable either. Such a member
used to be hidden from listings whileread_bytes()still returned it
under its raw name. (Writing to one already failed and created nothing;
that is unchanged.) A..that stays inside is resolved rather than
rejected (pkg/../ok.txtreadsok.txt), and when two spellings
normalize to one name the later member wins, as inzipfile/tarfile. Uri's RFC 3986 dot-segment removal is documented as a divergence
frompathlib(docs/divergences.md); the behaviour is unchanged.
Full Changelog: v0.9.4...v0.9.5