Browse Source

Show message when trying to go above /

master
Arun Prakash Jana 8 years ago
parent
commit
0aa1d43428
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      nnn.c

+ 3
- 1
nnn.c View File

@@ -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…
Cancel
Save