Fix handling of linked rename chains in incremental backups
commit41654f91f08eeff204d2ec2dabf2b81530060aaa
authorSergey Poznyakoff <gray@gnu.org>
Sat, 15 Feb 2020 08:57:35 +0000 (15 10:57 +0200)
committerSergey Poznyakoff <gray@gnu.org>
Sat, 15 Feb 2020 09:09:18 +0000 (15 11:09 +0200)
treed60e049deacea18c919b23eef9f413a0a75911cb
parent8d90723d306651648f19e32c2c1505aa9a152fe8
Fix handling of linked rename chains in incremental backups

* src/incremen.c: Change the meaning of the DIRF_RENAMED flag.  Now it
marks a directory which is the last one in a chain of renames.
Regular renamed directories are recognized by their orig member being
non-NULL.  Directories marked with DIRF_RENAMED start encoding of renames.
(procdir): Clear DIRF_RENAMED flag on directories which are origins for
renames.
(makedumpdir): Use the orig member to check if the directory is a
result of a rename.
(store_rename): Move the check for DIR_IS_RENAMED to the caller. Don't
clear the DIRF_RENAMED, it is not needed any more.

* tests/rename06.at: New test.
* tests/Makefile.am: Add rename06.at
* tests/testsuite.at: Likewise.
src/incremen.c
tests/Makefile.am
tests/rename06.at [new file with mode: 0644]
tests/testsuite.at