From 39d971818e17babbb9387d5c1463c19620f71144 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 20 Jul 2002 05:36:59 +0000 Subject: 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': ... --- tests/rm/fail-eperm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/rm/fail-eperm') diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm index fd9c7e157..a5eb4c18a 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; -- cgit v1.2.3-54-g00ecf