From dd22da8e9539cc88193987b6997769ae4ede2b15 Mon Sep 17 00:00:00 2001 From: Rob Day Date: Wed, 22 Aug 2012 23:04:19 +0100 Subject: rm: fix the new --dir (-d) option to work with -i * src/remove.c (prompt): Hoist the computation of is_empty, since we'll need it slightly earlier. Before, this function would arrange to fail with EISDIR when processing a directory without --recursive (-r). Adjust the condition to exempt an empty directory when --dir has been specified. Improve comments. * tests/rm/d-3: New file, to ensure that rm -d -i dir works. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. * THANKS.in: Update. Reported by Michael Price in http://bugs.gnu.org/12260 --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index d8a47ab57..e6d79bf92 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ GNU coreutils NEWS -*- outline -*- it detects this precise type of cycle, diagnoses it as such and eventually exits nonzero. + rm -i -d now prompts the user then removes an empty directory, rather + than ignoring the -d option and failing with an 'Is a directory' error. + [bug introduced in coreutils-8.19, with the addition of --dir (-d)] + * Noteworthy changes in release 8.19 (2012-08-20) [stable] -- cgit v1.2.3-70-g09d2