Parcourir la source

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 il y a 7 ans
Parent
révision
5c7aaa6d0d
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: A75979F35C080412
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. +1
    -1
      noice.c

+ 1
- 1
noice.c Voir le fichier

@@ -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;
}


Chargement…
Annuler
Enregistrer