summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2011-11-16 11:30:02 +0000
committernicm <nicm@openbsd.org>2011-11-16 11:30:02 +0000
commit27f4bfd6fa88e75da8caf33e7dd7f5de72a15e24 (patch)
tree61d7058bf354e683f7bf0b73125db2170e01b1a0
parentDo not unlink an offline message until it has been correctly enqueued. (diff)
downloadwireguard-openbsd-27f4bfd6fa88e75da8caf33e7dd7f5de72a15e24.tar.xz
wireguard-openbsd-27f4bfd6fa88e75da8caf33e7dd7f5de72a15e24.zip
Don't create a history file called -... doh. Pointed out by jmc.
-rw-r--r--usr.bin/less/cmdbuf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/less/cmdbuf.c b/usr.bin/less/cmdbuf.c
index 9a56979b4dd..93fbf113265 100644
--- a/usr.bin/less/cmdbuf.c
+++ b/usr.bin/less/cmdbuf.c
@@ -1352,7 +1352,9 @@ histfile_name()
return (save(name));
}
- /* Otherwise, file is in $HOME. */
+ /* Otherwise, file is in $HOME if enabled. */
+ if (strcmp (LESSHISTFILE, "-") == 0)
+ return (NULL);
home = lgetenv("HOME");
if (home == NULL || *home == '\0')
{