mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Try to get current dir from PWD first
This commit is contained in:
parent
e146ad0d7a
commit
97ac88dec2
|
@ -8306,7 +8306,8 @@ int main(int argc, char *argv[])
|
|||
session = NULL;
|
||||
} else if (argc == optind) {
|
||||
/* Start in the current directory */
|
||||
initpath = getcwd(NULL, 0);
|
||||
initpath = getenv("PWD");
|
||||
initpath = initpath ? xstrdup(initpath) : getcwd(NULL, 0);
|
||||
if (!initpath)
|
||||
initpath = "/";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue