Module Name: src
Committed By: christos
Date: Sun Dec 15 04:17:38 UTC 2019
Modified Files:
src/usr.bin/mail: complete.c
Log Message:
treat empty variables are unset (Steffen Nurpmeso)
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/mail/complete.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/mail/complete.c
diff -u src/usr.bin/mail/complete.c:1.21 src/usr.bin/mail/complete.c:1.22
--- src/usr.bin/mail/complete.c:1.21 Sat Dec 14 15:28:02 2019
+++ src/usr.bin/mail/complete.c Sat Dec 14 23:17:38 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: complete.c,v 1.21 2019/12/14 20:28:02 christos Exp $ */
+/* $NetBSD: complete.c,v 1.22 2019/12/15 04:17:38 christos Exp $ */
/*-
* Copyright (c) 1997-2000,2005,2006 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: complete.c,v 1.21 2019/12/14 20:28:02 christos Exp $");
+__RCSID("$NetBSD: complete.c,v 1.22 2019/12/15 04:17:38 christos Exp $");
#endif /* not lint */
/*
@@ -339,7 +339,8 @@ complete_filename(EditLine *el, char *wo
size_t len;
if ((fname = strrchr(word, '/')) == NULL) {
- if (word[0] == '+' && (mf = value(ENAME_FOLDER)) != NULL) {
+ if (word[0] == '+' && (mf = value(ENAME_FOLDER)) != NULL && *mf)
+ {
if (mf[0] == '/') {
(void)estrlcpy(dir, mf, sizeof(dir));
} else {