From 955d49149e7559048328a055a2e3623ef022c5c9 Mon Sep 17 00:00:00 2001 From: hjp Date: Thu, 15 May 2003 10:49:33 +0000 Subject: [PATCH] Changed tests on skip_fifo to use _ instead of $i. The latter caused extra calls to stat which clobbered the state of _ which caused spurious errors/warnings on symlinks. --- cleandir/cleandir.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cleandir/cleandir.pl b/cleandir/cleandir.pl index c545991..7d7f226 100755 --- a/cleandir/cleandir.pl +++ b/cleandir/cleandir.pl @@ -85,7 +85,7 @@ sub cleandir { } # Skip sockets and pipes - if ($skip_fifos && (-p $i || -S $i)) { + if ($skip_fifos && (-p _ || -S _)) { $notremoved++; next; } @@ -178,7 +178,12 @@ sub main { main(); # $Log: cleandir.pl,v $ -# Revision 1.3 2003-05-14 11:49:56 hjp +# Revision 1.4 2003-05-15 10:49:33 hjp +# Changed tests on skip_fifo to use _ instead of $i. The latter caused +# extra calls to stat which clobbered the state of _ which caused spurious +# errors/warnings on symlinks. +# +# Revision 1.3 2003/05/14 11:49:56 hjp # Added yet another patch by Chris Mason. # # Added POD.