When moving "up" the hierarchy, be careful to remove a just-emptied
authorJim Meyering <jim@meyering.net>
Thu, 28 Dec 2006 18:37:07 +0000 (19:37 +0100)
committerJim Meyering <jim@meyering.net>
Thu, 28 Dec 2006 18:37:07 +0000 (19:37 +0100)
commit88891aef7e24be24b3de49c91c25dc2049d08ffd
treeb1427a0015fa713353d3441d9a3e3c9741b3e408
parentbbcfef38a33a93a1c777e9adc732e10b7357c8b5
When moving "up" the hierarchy, be careful to remove a just-emptied
directory before opening ".", to avoid trouble with file system
implementations that cache readdir results at opendir-time.
* src/remove.c (AD_pop_and_chdir): Add a file descriptor parameter.
Don't update **DIRP.  Don't call fdopendir here.
(remove_dir): Call fdopendir here instead.
Report and patch from Mikulas Patocka:
<http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00170.html>
ChangeLog
src/remove.c