Work around unlinkat bug on FreeBSD and GNU/Hurd

* src/unlink.c (dunlink_insert): New function.
(flush_deferred_unlinks): Skip cwds and nonempty directories
at the first pass.  If force is requested, run a second pass
removing them.
(queue_deferred_unlink): Make sure current working directory
entries are sorted in descending order by the value of dir_idx.
This makes sure they will be removed in right order, which works
around unlinkat bug on FreeBSD and GNU/Hurd.
* tests/remfiles08b.at: Remove expected failure.
* tests/remfiles09b.at: Likewise.
This commit is contained in:
Sergey Poznyakoff
2015-11-11 13:01:45 +02:00
parent 6167c23e22
commit e6fcc73efa
3 changed files with 74 additions and 24 deletions
-2
View File
@@ -31,8 +31,6 @@
AT_SETUP([remove-files deleting two subdirs in -c/incr. mode])
AT_KEYWORDS([create incremental remove-files remfiles08 remfiles08b])
AT_XFAIL_IF(true) # we expect to fail in tar 1.27
AT_TAR_CHECK([
mkdir foo
mkdir bar
-2
View File
@@ -29,8 +29,6 @@
AT_SETUP([remove-files on full directory in -c/incr. mode])
AT_KEYWORDS([create incremental remove-files remfiles09 remfiles09b])
AT_XFAIL_IF(true) # we expect to fail in tar 1.27
AT_TAR_CHECK([
mkdir foo
echo foo/file > foo/file