Skip to content

Commit

Permalink
Resolved an issue caused by the way cmd.exe populates argv[0] (fixes #11
Browse files Browse the repository at this point in the history
).
  • Loading branch information
JusticeRage committed Jun 19, 2017
1 parent 4012fed commit bb63e2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,9 @@ int main(int argc, char** argv)
// Load the dynamic plugins.
bfs::path working_dir(argv[0]);
working_dir = working_dir.parent_path();
if (working_dir.empty()) { // cmd.exe does not provide the full path to the executable.
working_dir = "."; // Running ./manalyze.exe results in working_dir being empty,
} // which makes this additional check necessary.

// Linux: look for the configuration file in /etc/manalyze if
// nothing is found in the current folder.
Expand Down

0 comments on commit bb63e2d

Please sign in to comment.