From 14dff0f69d37e73cf99c77f5f5f38b2a3c6522f5 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sun, 27 May 2018 17:31:57 +0800 Subject: expand: Use HOME in tilde expansion when it is empty Currently if HOME is set to empty tilde expansion will fail, i.e., it will remain as a literal tilde. This patch changes it to return the empty string as required by POSIX. Signed-off-by: Herbert Xu --- src/expand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/expand.c b/src/expand.c index 45e9b79..eb50e15 100644 --- a/src/expand.c +++ b/src/expand.c @@ -385,7 +385,7 @@ done: } else { home = getpwhome(name); } - if (!home || !*home) + if (!home) goto lose; *p = c; strtodest(home, SQSYNTAX, quotes); -- cgit 1.4.1 t' value='switch'/> dontfiles
summary refs log tree commit diff
Commit message (Expand)Author
2019-07-25Use scheme to style HTMLsJune McEnroe
2019-07-25Don't match comments in strings in makeJune McEnroe
2019-07-25Generate index.html with links from bin.7June McEnroe
2019-07-24Warn when date has changedJune McEnroe
2019-07-24Add whenJune McEnroe
2019-07-24Remove histedit from bitJune McEnroe