Fix handling of directories removed during incremental tar run

Co-authored-by: Sergey Poznyakoff <gray@gnu.org.ua>
* paxutils: Upgrade
* src/create.c (create_archive): Use file_removed_diag
instead of calling the corresponding *_diag function
directly.
* tests/dirrem01.at: New testcase.
* tests/dirrem02.at: New testcase.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Likewise.
This commit is contained in:
Jonas Julino
2017-05-29 15:59:53 +03:00
committed by Sergey Poznyakoff
parent 795877532e
commit 8b9026f3ae
6 changed files with 133 additions and 3 deletions
+4 -2
View File
@@ -1395,13 +1395,15 @@ create_archive (void)
open_searchdir_flags);
if (fd < 0)
{
open_diag (p->name);
file_removed_diag (p->name, !p->parent,
open_diag);
break;
}
st.fd = fd;
if (fstat (fd, &st.stat) != 0)
{
stat_diag (p->name);
file_removed_diag (p->name, !p->parent,
stat_diag);
break;
}
st.orig_file_name = xstrdup (p->name);