From 5c7aaa6d0d10bdc1c1135b9a9cfd0d7e181303ef Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 30 Mar 2017 02:12:44 +0530 Subject: [PATCH] Shows 'Cannot resolve path' on narrow terminal noice truncates the cwd string dynamically. If the numbers of columns is lesser than the length of the path, cwd is truncated so that the correct path cannot be resolved. We should try to resolve the full path instead. --- noice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noice.c b/noice.c index 83319ade..96bc5a1e 100644 --- a/noice.c +++ b/noice.c @@ -614,7 +614,7 @@ redraw(char *path) ncols = PATH_MAX; strlcpy(cwd, path, ncols); cwd[ncols - strlen(CWD) - 1] = '\0'; - if (!realpath(cwd, cwdresolved)) { + if (!realpath(path, cwdresolved)) { printmsg("Cannot resolve path"); return; }