]> Sergey Matveev's repositories - nnn.git/commitdiff
Show message when trying to go above /
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 1 Apr 2017 21:20:56 +0000 (02:50 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 1 Apr 2017 21:20:56 +0000 (02:50 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index 802030e9976da5b32cc23d6fc4dd440f8dceaa11..bc2583cb9a84b50324c93a70e4d75c5bc71b7b86 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -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();