From 9becdd01d88c048411446575231c454dac3570bd Mon Sep 17 00:00:00 2001 From: "Steffen (Daode) Nurpmeso" Date: Mon, 7 Aug 2017 13:55:28 +0200 Subject: [PATCH] Fix [32e5c7c2] (MLE: KHT: auto-append / for directories at once..) --- tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tty.c b/tty.c index 338f6e9d..973412b4 100644 --- a/tty.c +++ b/tty.c @@ -2086,7 +2086,7 @@ jredo: } if(exp.s[exp.l - 1] != '/'){ - if(stat(exp.s, &sb) || S_ISDIR(sb.st_mode)){ + if(!stat(exp.s, &sb) && S_ISDIR(sb.st_mode)){ shoup = n_string_assign_buf(shoup, exp.s, exp.l); shoup = n_string_push_c(shoup, '/'); exp.s = n_string_cp(shoup); -- 2.11.4.GIT