mirror of
https://github.com/jarun/nnn.git
synced 2025-03-22 06:12:27 +00:00
Don't attempt to go back if on the relative root
This commit is contained in:
parent
8d4019f3aa
commit
9407399230
1 changed files with 3 additions and 1 deletions
4
noice.c
4
noice.c
|
@ -658,7 +658,9 @@ nochange:
|
|||
return;
|
||||
case SEL_BACK:
|
||||
/* There is no going back */
|
||||
if (strcmp(path, "/") == 0)
|
||||
if (strcmp(path, "/") == 0 ||
|
||||
strcmp(path, ".") == 0 ||
|
||||
strchr(path, '/') == NULL)
|
||||
goto nochange;
|
||||
if (canopendir(path) == 0) {
|
||||
printwarn();
|
||||
|
|
Loading…
Add table
Reference in a new issue