Fix workingCopyPathMode
This commit is contained in:
parent
517ef59e14
commit
61edf58c3e
|
@ -257,7 +257,8 @@ string TestApplication::workingCopyPathMode(const string &name, WorkingCopyMode
|
||||||
{
|
{
|
||||||
// ensure working directory is present
|
// ensure working directory is present
|
||||||
if (!dirExists(m_workingDir) && !makeDir(m_workingDir)) {
|
if (!dirExists(m_workingDir) && !makeDir(m_workingDir)) {
|
||||||
cerr << Phrases::Error << "Unable to create working copy for \"" << name << "\": can't create working directory." << Phrases::EndFlush;
|
cerr << Phrases::Error << "Unable to create working copy for \"" << name << "\": can't create working directory \"" << m_workingDir << "\"."
|
||||||
|
<< Phrases::EndFlush;
|
||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,16 +275,13 @@ string TestApplication::workingCopyPathMode(const string &name, WorkingCopyMode
|
||||||
}
|
}
|
||||||
currentLevel += *i;
|
currentLevel += *i;
|
||||||
|
|
||||||
// continue if subdirectory level already exists
|
// continue if subdirectory level already exists or we can successfully create the directory
|
||||||
if (dirExists(currentLevel)) {
|
if (dirExists(currentLevel) || makeDir(currentLevel)) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// continue if we can successfully create the directory
|
|
||||||
if (!makeDir(currentLevel)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// fail otherwise
|
// fail otherwise
|
||||||
cerr << Phrases::Error << "Unable to create working copy for \"" << name << "\": can't create working directory." << Phrases::EndFlush;
|
cerr << Phrases::Error << "Unable to create working copy for \"" << name << "\": can't create directory \"" << currentLevel
|
||||||
|
<< "\" (inside working directory)." << Phrases::EndFlush;
|
||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue