Changed: #1440 Return a different temporary directory every time

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent 31744c25cc
commit 6cd84d1ec5

@ -213,7 +213,8 @@ std::string CPipelineProject::getOutputDirectory()
std::string CPipelineProject::getTempDirectory() std::string CPipelineProject::getTempDirectory()
{ {
if (m_TempDirectory.empty()) std::string tempDirectory;
do
{ {
std::stringstream ss; std::stringstream ss;
ss << g_WorkDir; ss << g_WorkDir;
@ -225,10 +226,10 @@ std::string CPipelineProject::getTempDirectory()
ss << rand(); ss << rand();
ss << PIPELINE_DIRECTORY_TEMP_SUFFIX; ss << PIPELINE_DIRECTORY_TEMP_SUFFIX;
ss << "/"; ss << "/";
NLMISC::CFile::createDirectoryTree(ss.str()); tempDirectory = ss.str();
m_TempDirectory = ss.str(); } while (NLMISC::CFile::isDirectory(tempDirectory));
} NLMISC::CFile::createDirectoryTree(tempDirectory);
return m_TempDirectory; return tempDirectory;
} }
void CPipelineProject::parseValue(std::string &result, const std::string &value) void CPipelineProject::parseValue(std::string &result, const std::string &value)

@ -53,7 +53,6 @@ class CPipelineProject
protected: protected:
CPipelineWorkspace *m_Workspace; CPipelineWorkspace *m_Workspace;
NLMISC::CRefPtr<NLGEORGES::UForm> m_Form; NLMISC::CRefPtr<NLGEORGES::UForm> m_Form;
std::string m_TempDirectory;
uint32 m_ChangedReference; uint32 m_ChangedReference;
uint32 m_FileSizeReference; uint32 m_FileSizeReference;
uint32 m_CRC32; uint32 m_CRC32;

Loading…
Cancel
Save