nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 86c3f75512851abc37d84a5b3db603bff1db92cb
parent 8775a527799aa9d023abb412ae537b79c52494b3
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 31 Mar 2017 01:34:41 +0530

Fix: can't go to parent if only dir name specified

Invoking nnn with:

nnn dir
nnn ./dir
nnn dir

wouldn't allow user to navigate to parent directory.

Diffstat:
Mnnn.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/nnn.c b/nnn.c @@ -952,7 +952,11 @@ main(int argc, char *argv[]) printptr = &printent; if (argv[1] != NULL) { - ipath = argv[1]; + ipath = realpath(argv[1], cwd); + if (!ipath) { + fprintf(stderr, "%s: no such dir\n", argv[1]); + exit(1); + } } else { ipath = getcwd(cwd, sizeof(cwd)); if (ipath == NULL)