diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 4904750e9c..6c7c5222d5 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -1159,8 +1159,8 @@ std::string Application::getUserMacroDir() std::string Application::getResourceDir() { #ifdef RESOURCEDIR - // #6892: Conda may inject null characters => remove them - auto path = std::string(RESOURCEDIR); + // #6892: Conda may inject null characters => remove them using c_str() + std::string path = std::string(RESOURCEDIR).c_str(); path += PATHSEP; QDir dir(QString::fromStdString(path)); if (dir.isAbsolute()) @@ -1174,8 +1174,8 @@ std::string Application::getResourceDir() std::string Application::getLibraryDir() { #ifdef LIBRARYDIR - // #6892: Conda may inject null characters => remove them - auto path = std::string(LIBRARYDIR); + // #6892: Conda may inject null characters => remove them using c_str() + std::string path = std::string(LIBRARYDIR).c_str(); QDir dir(QString::fromStdString(path)); if (dir.isAbsolute()) return path; @@ -1188,8 +1188,8 @@ std::string Application::getLibraryDir() std::string Application::getHelpDir() { #ifdef DOCDIR - // #6892: Conda may inject null characters => remove them - auto path = std::string(DOCDIR); + // #6892: Conda may inject null characters => remove them using c_str() + std::string path = std::string(DOCDIR).c_str(); path += PATHSEP; QDir dir(QString::fromStdString(path)); if (dir.isAbsolute())