DragonFly BSD
DragonFly submit List (threaded) for 2004-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

bin/rmdir -p option bug [patch]


From: "Douwe Kiela" <virtus@xxxxxxxxxx>
Date: Thu, 22 Jul 2004 20:39:44 +0200

Hey peeps,

According to SUSv3, the -p option should behave exactly the same as rmdir
without any option, only that it recursively removes all directories
mentioned
as arguments in the command line. In the current rmdir, you can't remove
multiple directories and meanwhile recursively remove all it's
subdirectories.

This doesn't work:

daedalus# rmdir -p ./a ./z
rmdir: ./a: Directory not empty
rmdir: ./z: Directory not empty

while these directories are completely empty, except for other empty
subdirectories.
SUSv3 states, aswell as the manual page:

-p
Remove all directories in a pathname

This is due to an error in the rmdir source code in the loop that handles
command
line arguments. A patch can be found here:

http://virtus.ath.cx/dfbsd/rmdir.c.diff

Regards,
Douwe




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]