mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 11:18:06 +00:00
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:
committed by
GitHub
parent
620f38a6f7
commit
b4bf4554ae
@@ -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}/")
|
||||
|
||||
Reference in New Issue
Block a user