From e40fb5255422dfe2937414a51e40bf95ade80ab7 Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Sun, 6 Dec 2015 11:37:24 +0100 Subject: [PATCH] output a warning when archive exists instead of failing --- src/laminar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/laminar.cpp b/src/laminar.cpp index 8337978..f8d0f4f 100644 --- a/src/laminar.cpp +++ b/src/laminar.cpp @@ -536,7 +536,9 @@ void Laminar::assignNewJobs() { run->wd = wd.string(); // create an archive directory 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()); break; }