diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-08-03 18:45:21 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-08-03 18:45:21 (GMT) |
commit | 36ce9d0226a2973ba7571466702010943493dcdf (patch) | |
tree | 7572a35cf9058ea1d1b2372a3aaaa3fc305d3780 /src/dot.cpp | |
parent | f8a55e0170525869b64659ee05da647738b21e5b (diff) | |
download | Doxygen-36ce9d0226a2973ba7571466702010943493dcdf.zip Doxygen-36ce9d0226a2973ba7571466702010943493dcdf.tar.gz Doxygen-36ce9d0226a2973ba7571466702010943493dcdf.tar.bz2 |
Fixed issue running dot on files with non-ascii characters
Diffstat (limited to 'src/dot.cpp')
-rw-r--r-- | src/dot.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dot.cpp b/src/dot.cpp index ffe1028..7d9e795 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -665,7 +665,7 @@ static void checkDotResult(const QCString &imgName) { if (Config_getEnum("DOT_IMAGE_FORMAT")=="png") { - FILE *f = fopen(imgName,"rb"); + FILE *f = portable_fopen(imgName,"rb"); if (f) { char data[4]; @@ -961,24 +961,25 @@ bool DotFilePatcher::run() //printf("DotFilePatcher::addSVGConversion: file=%s zoomable=%d\n", // m_patchFile.data(),map->zoomable); } - QCString tmpName = m_patchFile+".tmp"; - if (!QDir::current().rename(m_patchFile,tmpName)) + QString tmpName = QString::fromUtf8(m_patchFile+".tmp"); + QString patchFile = QString::fromUtf8(m_patchFile); + if (!QDir::current().rename(patchFile,tmpName)) { err("Failed to rename file %s to %s!\n",m_patchFile.data(),tmpName.data()); return FALSE; } QFile fi(tmpName); - QFile fo(m_patchFile); + QFile fo(patchFile); if (!fi.open(IO_ReadOnly)) { err("problem opening file %s for patching!\n",tmpName.data()); - QDir::current().rename(tmpName,m_patchFile); + QDir::current().rename(tmpName,patchFile); return FALSE; } if (!fo.open(IO_WriteOnly)) { err("problem opening file %s for patching!\n",m_patchFile.data()); - QDir::current().rename(tmpName,m_patchFile); + QDir::current().rename(tmpName,patchFile); return FALSE; } FTextStream t(&fo); |