diff options
-rwxr-xr-x | lib/isodumper.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py index b67b436..2bc3e33 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -458,7 +458,7 @@ class IsoDumper(basedialog.BaseDialog): info = Info(_("Backup confirmation"), True, _("Do you want to overwrite the file?")) if not (self.ask_YesOrNo(info)): self.returncode = 1 - return True + return False st = os.statvfs(os.path.dirname(dest)) free = st.f_bavail * st.f_frsize if free < self.deviceSize: @@ -468,6 +468,7 @@ class IsoDumper(basedialog.BaseDialog): logging.warning(message) self.emergency(message) self.initial_state() + return False else: self.operation = True self.returncode = 0 @@ -498,6 +499,8 @@ class IsoDumper(basedialog.BaseDialog): else: self.emergency(message) self.initial_state() + return False + return True def do_write(self): self.wip_unsensitive() @@ -1041,11 +1044,15 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog if self.backup_cbox.isChecked(): # check that a name is set if self.backup_is_selected: - self.backup_go() - self.backup_is_selected = False + if self.backup_go(): + self.backup_is_selected = False + else: + # something went wrong, we stop + return else: info = Info(_("Error"), True, _("No image for backup is selected.")) self.ask_OK(info) + return if self.write_cbox.isChecked(): if self.image_is_selected: self.do_write() |