]> git.ipfire.org Git - thirdparty/libarchive.git/commit
mtree: Do not append '/' when basename is '.' 3008/head
authorJose Luis Duran <jlduran@FreeBSD.org>
Wed, 15 Apr 2026 01:36:07 +0000 (01:36 +0000)
committerJose Luis Duran <jlduran@FreeBSD.org>
Fri, 8 May 2026 00:39:01 +0000 (00:39 +0000)
commitdc888075024038cd9b88c663b8a6f121a92515b5
tree74400c5a7eb8cf81964d133d1cb0bcce13c41851
parent73c4f1c03f470bdecc01f90902660e468cd952ba
mtree: Do not append '/' when basename is '.'

If the basename is '.', it means it is the root directory ('/').  Do not
append '/' to '.', as this will produce a path '/.', resulting in an
invalid mtree entry.

For example, using base.txz from FreeBSD:

    tar -c -f - --format=mtree @base.txz | mtree -C
Makefile.am
libarchive/archive_write_set_format_mtree.c
libarchive/test/CMakeLists.txt
libarchive/test/test_write_format_mtree_absolute.c [new file with mode: 0644]