Commit dcaa947c authored by Peter Hutterer's avatar Peter Hutterer
Browse files

For -R and after chdir, add the current directory to the path

This restores the behavior pre 1aecdffa, at
least when -R is given. For a normal invocation without -R we don't add the
current directory, because 1aecdffa isn't totally wrong about whether that's a
good idea.

Fixes #3
parent d373c9b4
......@@ -549,7 +549,10 @@ parseArgs(int argc, char *argv[])
WARN1("Changing root directory to \"%s\"\n", rootDir);
if ((chdir(rootDir) < 0) && (warningLevel > 0))
if (chdir(rootDir) == 0)
} else if (warningLevel > 0)
WARN1("Couldn't change directory to \"%s\"\n", rootDir);
ACTION("Root directory (-R) option ignored\n");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment