1
1
mirror of https://github.com/jarun/nnn.git synced 2024-09-22 02:18:04 +03:00

Show message when trying to go above /

This commit is contained in:
Arun Prakash Jana 2017-04-02 02:50:56 +05:30
parent 951d323616
commit 0aa1d43428
No known key found for this signature in database
GPG Key ID: A75979F35C080412

4
nnn.c
View File

@ -828,8 +828,10 @@ nochange:
/* There is no going back */
if (strcmp(path, "/") == 0 ||
strcmp(path, ".") == 0 ||
strchr(path, '/') == NULL)
strchr(path, '/') == NULL) {
printmsg("You are at /");
goto nochange;
}
dir = xdirname(path);
if (canopendir(dir) == 0) {
printwarn();