Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/nvi/usr.bin/recover Don't get stuck reading nam...



details:   https://anonhg.NetBSD.org/src/rev/08f8032e2fb2
branches:  trunk
changeset: 827699:08f8032e2fb2
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 09 15:03:01 2017 +0000

description:
Don't get stuck reading named pipes; only try to read plain files in
order to send mail.

diffstat:

 external/bsd/nvi/usr.bin/recover/virecover |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 80d2515520d0 -r 08f8032e2fb2 external/bsd/nvi/usr.bin/recover/virecover
--- a/external/bsd/nvi/usr.bin/recover/virecover        Thu Nov 09 12:46:55 2017 +0000
+++ b/external/bsd/nvi/usr.bin/recover/virecover        Thu Nov 09 15:03:01 2017 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: virecover,v 1.3 2017/11/04 07:04:01 kre Exp $
+#      $NetBSD: virecover,v 1.4 2017/11/09 15:03:01 christos Exp $
 #
 #      @(#)recover.in  8.8 (Berkeley) 10/10/96
 #
@@ -17,13 +17,13 @@
        esac
 
        # Only test files that are readable.
-       if ! [ -f "$i" ] || ! [ -r "$i" ]; then
+       if [ ! -f "$i" ] || [ ! -r "$i" ]; then
                continue
        fi
 
        # Unmodified nvi editor backup files either have the
        # execute bit set or are zero length.  Delete them.
-       if [ -x "$i" ] || ! [ -s "$i" ]; then
+       if [ -x "$i" ] || [ ! -s "$i" ]; then
                rm -f "$i"
        fi
 done
@@ -36,8 +36,8 @@
        $RECDIR/recover.\*) continue;;
        esac
 
-       # Only test files that are readable.
-       if ! [ -r "$i" ]; then
+       # Only test plain files that are readable.
+       if [ ! -f "$i" ] || [ ! -r "$i" ]; then
                continue
        fi
 



Home | Main Index | Thread Index | Old Index