Fix error handling when trying to delete non-existent workspace

GSoC/Meterpreter_Web_Console
Jon Hart 2018-04-04 11:40:21 -07:00
parent 1fa40bfe3b
commit bc81cfad1f
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ module Msf::DBManager::Workspace
names.each do |name|
workspace = framework.db.find_workspace(name)
if workspace.nil?
error << "Workspace not found: #{name}"
error_msg << "Workspace not found: #{name}"
elsif workspace.default?
workspace.destroy
workspace = framework.db.add_workspace(name)