From 987507df569c264184ba92bcc29a1191eb32c814 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 27 Jan 2002 07:48:13 +0000 Subject: Only deregister found files (filenames sometimes change from old to new package). --- aptdpkgclean.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aptdpkgclean.sh b/aptdpkgclean.sh index 7de9b77..0291fdd 100755 --- a/aptdpkgclean.sh +++ b/aptdpkgclean.sh @@ -8,8 +8,9 @@ cat /var/lib/my_ro_hack.todel | while read file; do b=`basename $file`; d=`dirname $file` XF="${b#.}"; XF="$d/${XF%.dpkg-ro-used.*}" - N2=`find "$XF" -printf "%i\n"` + N2=`find "$XF" -printf "%i\n"` || continue + [ -n "$XF" ] || continue if [ "$N1" != "$N2" ] && ! fuser -s "$file"; then rm -f "$file" else -- cgit v1.2.3