diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-02-27 21:45:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 21:45:31 (GMT) |
commit | 801e41034b82d7725aac6c95dd0c93b66ec0342c (patch) | |
tree | 16f290cbe59c2b239d6c7032ca30166588f197da | |
parent | 45b9fd69751d6fe4410c98adf9bd7ef15fa136c1 (diff) | |
parent | 57662b4051d9c861e089072ed3dc6409f81ff3f7 (diff) | |
download | Doxygen-801e41034b82d7725aac6c95dd0c93b66ec0342c.zip Doxygen-801e41034b82d7725aac6c95dd0c93b66ec0342c.tar.gz Doxygen-801e41034b82d7725aac6c95dd0c93b66ec0342c.tar.bz2 |
Merge pull request #7618 from albert-github/feature/bug_doxyparse_tmp_dir
Problem with temporary / intermediate directory in doxyparse
-rw-r--r-- | addon/doxyparse/doxyparse.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp index 515d2ba..78a91d3 100644 --- a/addon/doxyparse/doxyparse.cpp +++ b/addon/doxyparse/doxyparse.cpp @@ -44,6 +44,7 @@ #include <qcstring.h> #include <qregexp.h> #include "namespacedef.h" +#include "portable.h" class Doxyparse : public CodeOutputInterface { @@ -449,12 +450,14 @@ int main(int argc,char **argv) { // we need a place to put intermediate files std::ostringstream tmpdir; -#if !defined(_WIN32) || defined(__CYGWIN__) - unsigned int pid = (uint)getpid(); -#else - unsigned int pid = (uint)GetCurrentProcessId(); -#endif - tmpdir << "/tmp/doxyparse-" << pid; + unsigned int pid = Portable::pid(); + if (Portable::getenv("TMP")) + tmpdir << Portable::getenv("TMP") << "/doxyparse-" << pid; + else if (Portable::getenv("TEMP")) + tmpdir << Portable::getenv("TEMP") << "/doxyparse-" << pid; + else + tmpdir << "doxyparse-" << pid; + Config_getString(OUTPUT_DIRECTORY)= tmpdir.str().c_str(); // enable HTML (fake) output to omit warning about missing output format Config_getBool(GENERATE_HTML)=TRUE; |