From a11b241d4a5ec7ee1009905372cf32fb4538fbb3 Mon Sep 17 00:00:00 2001 From: Orlov Sergey Date: Tue, 4 Apr 2017 22:43:47 +0300 Subject: 40935: User names need metafying. On some systems they can contain 8-bit characters and on all systems this is logically correct anyway. --- Src/utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src') diff --git a/Src/utils.c b/Src/utils.c index b3fa3d24c..9701ea78a 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1230,13 +1230,13 @@ adduserdir(char *s, char *t, int flags, int always) * named directory, since these are sometimes used for * special purposes. */ - nd->dir = ztrdup(t); + nd->dir = metafy(t, -1, META_DUP); } else - nd->dir = ztrduppfx(t, eptr - t); + nd->dir = metafy(t, eptr - t, META_DUP); /* The variables PWD and OLDPWD are not to be displayed as ~PWD etc. */ if (!strcmp(s, "PWD") || !strcmp(s, "OLDPWD")) nd->node.flags |= ND_NOABBREV; - nameddirtab->addnode(nameddirtab, ztrdup(s), nd); + nameddirtab->addnode(nameddirtab, metafy(s, -1, META_DUP), nd); } /* Get a named directory: this function can cause a directory name * -- cgit 1.4.1