浏览代码

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.
master
Arun Prakash Jana 7 年前
父节点
当前提交
5c7aaa6d0d
找不到此签名对应的密钥 GPG 密钥 ID: A75979F35C080412
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      noice.c

+ 1
- 1
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;
}


正在加载...
取消
保存