mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
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.
This commit is contained in:
parent
8775a52779
commit
86c3f75512
6
nnn.c
6
nnn.c
|
@ -952,7 +952,11 @@ main(int argc, char *argv[])
|
||||||
printptr = &printent;
|
printptr = &printent;
|
||||||
|
|
||||||
if (argv[1] != NULL) {
|
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 {
|
} else {
|
||||||
ipath = getcwd(cwd, sizeof(cwd));
|
ipath = getcwd(cwd, sizeof(cwd));
|
||||||
if (ipath == NULL)
|
if (ipath == NULL)
|
||||||
|
|
Loading…
Reference in a new issue