Added additional check for cloning a VM
An attempt to clone a VM to a name that is already in use will fail more gracefully and with an explicit warning message.
This commit is contained in:
parent
733f00ddf2
commit
ddb70fe8ea
@ -852,6 +852,15 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
||||
if not ok or clone_name == "":
|
||||
return
|
||||
|
||||
name_in_use = clone_name in self.qubes_app.domains
|
||||
|
||||
if name_in_use:
|
||||
QtGui.QMessageBox.warning(
|
||||
None, self.tr("Name already in use!"),
|
||||
self.tr("There already exists a qube called '{}'. "
|
||||
"Cloning aborted.").format(clone_name))
|
||||
return
|
||||
|
||||
self.progress = QtGui.QProgressDialog(
|
||||
self.tr(
|
||||
"Cloning Qube..."), "", 0, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user