From b4bf4554ae17a0e4671aec84008c9de0ee85d790 Mon Sep 17 00:00:00 2001 From: Mahfuzur Rahman Bappy Date: Mon, 24 Feb 2020 14:58:04 +0600 Subject: [PATCH] Bug fix: create back up folder if not exist When copying flags, scenario, and log file, create back up project folder if not exist. --- lib/batch/batch_secgen.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/batch/batch_secgen.rb b/lib/batch/batch_secgen.rb index da6810229..39e8e8c8e 100644 --- a/lib/batch/batch_secgen.rb +++ b/lib/batch/batch_secgen.rb @@ -238,6 +238,7 @@ def start(options) log.close # Back up project flags, scenario, and log file + FileUtils.mkdir_p("#{backup_path}#{project_id}") unless Dir.exist?("#{backup_path}#{project_id}") FileUtils.cp(log_path, ("#{backup_path}#{project_id}/" + log_name)) FileUtils.cp("#{project_path}/#{FLAGS_FILENAME}", "#{backup_path}#{project_id}/") FileUtils.cp("#{project_path}/scenario.xml", "#{backup_path}#{project_id}/")