mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Show message when trying to go above /
This commit is contained in:
parent
951d323616
commit
0aa1d43428
4
nnn.c
4
nnn.c
|
@ -828,8 +828,10 @@ nochange:
|
||||||
/* There is no going back */
|
/* There is no going back */
|
||||||
if (strcmp(path, "/") == 0 ||
|
if (strcmp(path, "/") == 0 ||
|
||||||
strcmp(path, ".") == 0 ||
|
strcmp(path, ".") == 0 ||
|
||||||
strchr(path, '/') == NULL)
|
strchr(path, '/') == NULL) {
|
||||||
|
printmsg("You are at /");
|
||||||
goto nochange;
|
goto nochange;
|
||||||
|
}
|
||||||
dir = xdirname(path);
|
dir = xdirname(path);
|
||||||
if (canopendir(dir) == 0) {
|
if (canopendir(dir) == 0) {
|
||||||
printwarn();
|
printwarn();
|
||||||
|
|
Loading…
Reference in a new issue