In tar.2.5.1 I added backward compatible logic in Tar.Header.unmarshal to synthesize a Tar.Header.Link.Directory link indicator if the link indicator is either '0' or '\000' and the file name ends in a /.
In a95d00a5c9327072fbd089000314e2c3afbbccca a test was added with a specially crafted tar archive with an empty regular file placeholder with a preceding pax header setting path=clearly/a/directory/. I found that in GNU tar and bsdtar they list a directory clearly/a/directory as does tar.2.5.1.
@liebach was helpful in testing the behavior on OpenBSD:
It seems OpenBSD's tar and pax are not as easily convinced that the archive clearly contains a directory. It may be worth investigating why OpenBSD's tools treat the archive differently. In any case it's an archive unlikely to be found in the wild I suspect.
In tar.2.5.1 I added backward compatible logic in
Tar.Header.unmarshal
to synthesize aTar.Header.Link.Directory
link indicator if the link indicator is either'0'
or'\000'
and the file name ends in a/
.In a95d00a5c9327072fbd089000314e2c3afbbccca a test was added with a specially crafted tar archive with an empty regular file
placeholder
with a preceding pax header settingpath=clearly/a/directory/
. I found that in GNU tar and bsdtar they list a directoryclearly/a/directory
as does tar.2.5.1.@liebach was helpful in testing the behavior on OpenBSD:
It seems OpenBSD's tar and pax are not as easily convinced that the archive clearly contains a directory. It may be worth investigating why OpenBSD's tools treat the archive differently. In any case it's an archive unlikely to be found in the wild I suspect.