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-01-26Add beef to READMEJune McEnroe
2019-01-26Add beef Befunge-93 interpreterJune McEnroe
2019-01-26Add back tux to ssh configJune McEnroe
2019-01-25Set nvim UI colors back to the 8-color paletteJune McEnroe
2019-01-22Complete ASCII set of WIP serif8x16.psfJune McEnroe
2019-01-22Add WIP serif8x16.psfJune McEnroe
2019-01-21Save cash history incrementallyJune McEnroe
2019-01-19Remove pingbotJune McEnroe