Bug fix: create back up folder if not exist

When copying flags, scenario, and log file, create back up project folder if not exist.
This commit is contained in:
Mahfuzur Rahman Bappy
2020-02-24 14:58:04 +06:00
committed by GitHub
parent 620f38a6f7
commit b4bf4554ae

View File

@@ -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}/")