diff --git a/code/nel/tools/pipeline/service/pipeline_project.cpp b/code/nel/tools/pipeline/service/pipeline_project.cpp index c9f8e78c8..7311996f9 100644 --- a/code/nel/tools/pipeline/service/pipeline_project.cpp +++ b/code/nel/tools/pipeline/service/pipeline_project.cpp @@ -213,7 +213,8 @@ std::string CPipelineProject::getOutputDirectory() std::string CPipelineProject::getTempDirectory() { - if (m_TempDirectory.empty()) + std::string tempDirectory; + do { std::stringstream ss; ss << g_WorkDir; @@ -225,10 +226,10 @@ std::string CPipelineProject::getTempDirectory() ss << rand(); ss << PIPELINE_DIRECTORY_TEMP_SUFFIX; ss << "/"; - NLMISC::CFile::createDirectoryTree(ss.str()); - m_TempDirectory = ss.str(); - } - return m_TempDirectory; + tempDirectory = ss.str(); + } while (NLMISC::CFile::isDirectory(tempDirectory)); + NLMISC::CFile::createDirectoryTree(tempDirectory); + return tempDirectory; } void CPipelineProject::parseValue(std::string &result, const std::string &value) diff --git a/code/nel/tools/pipeline/service/pipeline_project.h b/code/nel/tools/pipeline/service/pipeline_project.h index 555a4237d..037dd4ec1 100644 --- a/code/nel/tools/pipeline/service/pipeline_project.h +++ b/code/nel/tools/pipeline/service/pipeline_project.h @@ -53,7 +53,6 @@ class CPipelineProject protected: CPipelineWorkspace *m_Workspace; NLMISC::CRefPtr m_Form; - std::string m_TempDirectory; uint32 m_ChangedReference; uint32 m_FileSizeReference; uint32 m_CRC32;