mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Do not modify $PWD
This commit is contained in:
parent
42061b0399
commit
fc00faf7d0
|
@ -8315,8 +8315,9 @@ int main(int argc, char *argv[])
|
|||
session = NULL;
|
||||
} else if (argc == optind) {
|
||||
/* Start in the current directory */
|
||||
initpath = getenv("PWD");
|
||||
initpath = initpath ? xstrdup(initpath) : getcwd(NULL, 0);
|
||||
char *startpath = getenv("PWD");
|
||||
|
||||
initpath = startpath ? xstrdup(startpath) : getcwd(NULL, 0);
|
||||
if (!initpath)
|
||||
initpath = "/";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue