teach find_root_device to deal with /dev/ subdirs
(by "Kirill K. Smirnov" <lich@math.spbu.ru>)
This commit is contained in:
@ -40,7 +40,7 @@ int rm_main(int argc, char **argv)
|
||||
do {
|
||||
const char *base = bb_get_last_path_component(*argv);
|
||||
|
||||
if ((base[0] == '.') && (!base[1] || ((base[1] == '.') && !base[2]))) {
|
||||
if (DOT_OR_DOTDOT(base)) {
|
||||
bb_error_msg("cannot remove '.' or '..'");
|
||||
} else if (remove_file(*argv, flags) >= 0) {
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user