From 36c3e1171f9213cd9523889b560260ba91689f1f Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 21 Jun 2000 15:18:51 +0000 Subject: [PATCH] Fix ~logname expansion. --- muttlib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/muttlib.c b/muttlib.c index 8f0dc8ad..ff2333b5 100644 --- a/muttlib.c +++ b/muttlib.c @@ -329,11 +329,15 @@ char *_mutt_expand_path (char *s, size_t slen, int rx) struct passwd *pw; if ((t = strchr (s + 1, '/'))) *t = 0; + if ((pw = getpwnam (s + 1))) { strfcpy (p, pw->pw_dir, sizeof (p)); if (t) - tail = t + 1; + { + *t = '/'; + tail = t; + } else tail = ""; } -- 2.40.0