From: Jim Meyering Date: Sat, 20 Jul 2002 05:36:59 +0000 (+0000) Subject: skip directories, too. X-Git-Tag: FILEUTILS-4_1_10~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39d971818e17babbb9387d5c1463c19620f71144;p=thirdparty%2Fcoreutils.git skip directories, too. Otherwise, we'd have to account for the additional `directory ' part of a diagnostic like this: fail-eperm: unexpected dignostic from `rm -f /tmp/.pcmcia'; got rm: cannot remove directory `/tmp/.pcmcia': Is a directory expected rm: cannot remove `/tmp/.pcmcia': ... --- diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm index fd9c7e157f..a5eb4c18a4 100755 --- a/tests/rm/fail-eperm +++ b/tests/rm/fail-eperm @@ -52,9 +52,9 @@ foreach my $dir (@dir_list) foreach my $f (readdir DIR_HANDLE) { - # Skip files owned by self, and symlinks. + # Skip files owned by self, symlinks, and directories. # It's not technically necessary to skip symlinks, but it's simpler. - -l $f || -o _ + -l $f || -o _ || -d _ and next; $found_file = 1;