du: don't abort when a subdir is renamed during traversal
authorJim Meyering <meyering@redhat.com>
Sat, 8 Jan 2011 16:44:55 +0000 (17:44 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 10 Jan 2011 06:49:55 +0000 (07:49 +0100)
commit1c5987d2effdfae93362fcc4575c8ca4057740fc
tree370a04cf2fbf018b89cf1e02d81ed2bcf37e6759
parentd5d283dbc9ae8d727470975bc8fdd3371468cbdf
du: don't abort when a subdir is renamed during traversal

* NEWS (Bug fixes): Mention it.
* src/du.c (prev_level): Move declaration "up" to file-scope global.
(du_files): Reset prev_level to 0 upon abnormal fts_read termination.
Reported by Johathan Nieder in http://bugs.debian.org/609049
Also, improve a diagnostic.
* tests/du/move-dir-while-traversing: Test for the above.
* tests/Makefile.am (TESTS): Add it.
NEWS
src/du.c
tests/Makefile.am
tests/du/move-dir-while-traversing [new file with mode: 0755]