Skip to content

Commit

Permalink
Try to get current dir from PWD first
Browse files Browse the repository at this point in the history
  • Loading branch information
jarun committed Aug 10, 2021
1 parent e146ad0 commit 97ac88d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 97ac88d

Please sign in to comment.