diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-13 23:59:52 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-13 23:59:52 +0000 |
commit | 16abcd90aefae8bdb9f7d80a555982dba6ca59b5 (patch) | |
tree | b7e23fd3c844849d188813323076c93105a57d4d /coreutils/rm.c | |
parent | 334fa9bcb50df9a03288be252096750dcec14404 (diff) | |
download | busybox-w32-16abcd90aefae8bdb9f7d80a555982dba6ca59b5.tar.gz busybox-w32-16abcd90aefae8bdb9f7d80a555982dba6ca59b5.tar.bz2 busybox-w32-16abcd90aefae8bdb9f7d80a555982dba6ca59b5.zip |
teach find_root_device to deal with /dev/ subdirs
(by "Kirill K. Smirnov" <lich@math.spbu.ru>)
Diffstat (limited to 'coreutils/rm.c')
-rw-r--r-- | coreutils/rm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/rm.c b/coreutils/rm.c index 61e3e7010..e29073db8 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c | |||
@@ -40,7 +40,7 @@ int rm_main(int argc, char **argv) | |||
40 | do { | 40 | do { |
41 | const char *base = bb_get_last_path_component(*argv); | 41 | const char *base = bb_get_last_path_component(*argv); |
42 | 42 | ||
43 | if ((base[0] == '.') && (!base[1] || ((base[1] == '.') && !base[2]))) { | 43 | if (DOT_OR_DOTDOT(base)) { |
44 | bb_error_msg("cannot remove '.' or '..'"); | 44 | bb_error_msg("cannot remove '.' or '..'"); |
45 | } else if (remove_file(*argv, flags) >= 0) { | 45 | } else if (remove_file(*argv, flags) >= 0) { |
46 | continue; | 46 | continue; |