mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
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.
This commit is contained in:
parent
b5e0023bfc
commit
5c7aaa6d0d
2
noice.c
2
noice.c
|
@ -614,7 +614,7 @@ redraw(char *path)
|
||||||
ncols = PATH_MAX;
|
ncols = PATH_MAX;
|
||||||
strlcpy(cwd, path, ncols);
|
strlcpy(cwd, path, ncols);
|
||||||
cwd[ncols - strlen(CWD) - 1] = '\0';
|
cwd[ncols - strlen(CWD) - 1] = '\0';
|
||||||
if (!realpath(cwd, cwdresolved)) {
|
if (!realpath(path, cwdresolved)) {
|
||||||
printmsg("Cannot resolve path");
|
printmsg("Cannot resolve path");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue