diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-09-03 09:28:43 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2016-09-03 09:28:43 (GMT) |
commit | 3df5c424078f63133b2130ef26ddd569e5fd8412 (patch) | |
tree | 6214151392909d161548ae2edad6bb7049eff1ed /src/portable.cpp | |
parent | 9ae1af9b8679a0f14cb568d1db3afcc6e3ba40a6 (diff) | |
parent | 752523cd122d6ffdd72c89955005d77819740675 (diff) | |
download | Doxygen-3df5c424078f63133b2130ef26ddd569e5fd8412.zip Doxygen-3df5c424078f63133b2130ef26ddd569e5fd8412.tar.gz Doxygen-3df5c424078f63133b2130ef26ddd569e5fd8412.tar.bz2 |
Merge branch 'feature/bug_766059' of https://github.com/albert-github/doxygen into albert-github-feature/bug_766059
Diffstat (limited to 'src/portable.cpp')
-rw-r--r-- | src/portable.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/portable.cpp b/src/portable.cpp index 5886793..46adccf 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -448,4 +448,26 @@ bool portable_isAbsolutePath(const char *fileName) return false; } - +/** + * Correct a possible wrong PATH variable + * + * This routine was inspired by the cause for bug 766059 was that in the Windows path there were forward slahes. + */ +void portable_correct_path(void) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + const char *p = portable_getenv("PATH"); + char *q = (char *)malloc(strlen(p) + 1); + strcpy(q, p); + bool found = false; + for (int i = 0 ; i < strlen(q); i++) + { + if (q[i] == '/') + { + q[i] = '\\'; + found = true; + } + } + if (found) portable_setenv("PATH",q); +#endif +} |