1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-10-27 20:34:20 +00:00

output a warning when archive exists instead of failing

This commit is contained in:
Oliver Giles 2015-12-06 11:37:24 +01:00
parent 1273b36260
commit e40fb52554

View File

@ -536,7 +536,9 @@ void Laminar::assignNewJobs() {
run->wd = wd.string(); run->wd = wd.string();
// create an archive directory // create an archive directory
fs::path archive = fs::path(homeDir)/"archive"/run->name/std::to_string(buildNum); fs::path archive = fs::path(homeDir)/"archive"/run->name/std::to_string(buildNum);
if(!fs::create_directories(archive)) { if(fs::is_directory(archive)) {
KJ_LOG(WARNING, "Archive directory already exists", archive.string());
} else if(!fs::create_directories(archive)) {
KJ_LOG(ERROR, "Could not create archive directory", archive.string()); KJ_LOG(ERROR, "Could not create archive directory", archive.string());
break; break;
} }