diff options
| author | Papoteur <papoteur@mageia.org> | 2026-01-05 08:54:06 +0100 |
|---|---|---|
| committer | Papoteur <papoteur@mageia.org> | 2026-01-05 09:24:54 +0100 |
| commit | bf8628182b86cfa52089903461b4e0ba87bba450 (patch) | |
| tree | d07a78b0d61931c1f91532ffb16de7a8dc960f9d | |
| parent | 18b43a89664429766e26d1fddea5cc747a7427d1 (diff) | |
| download | isodumper-bf8628182b86cfa52089903461b4e0ba87bba450.tar isodumper-bf8628182b86cfa52089903461b4e0ba87bba450.tar.gz isodumper-bf8628182b86cfa52089903461b4e0ba87bba450.tar.bz2 isodumper-bf8628182b86cfa52089903461b4e0ba87bba450.tar.xz isodumper-bf8628182b86cfa52089903461b4e0ba87bba450.zip | |
Format: erase also iso 9660 descriptor before formatting (mga#34877)
Improve progress bar
| -rwxr-xr-x | backend/raw_write.py | 4 | ||||
| -rwxr-xr-x | lib/isodumper.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/backend/raw_write.py b/backend/raw_write.py index 2a9f126..f06d8ad 100755 --- a/backend/raw_write.py +++ b/backend/raw_write.py @@ -202,8 +202,8 @@ class Dumper(object): logging.debug(f"Start doing partition on {target} with label {label} in order {order}") if order == b"1": logging.debug("Erasing MBR") - # First erase MBR and partition table , if any - p = run(["dd", "if=/dev/zero", "of=%s" % target, "bs=512", "count=1"], capture_output=True) + # First erase MBR and partition table , if any, until iso 9660 descriptor + p = run(["dd", "if=/dev/zero", "of=%s" % target, "bs=512", "count=34K"], capture_output=True) if p.returncode != 0: print(stderr) self.return_message = _("Writing error.") diff --git a/lib/isodumper.py b/lib/isodumper.py index f9ecbd9..2ac7feb 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -476,6 +476,7 @@ class IsoDumper(basedialog.BaseDialog): self.warning, ) if self.ask_YesOrNo(info): + self.progress.setEnabled() name = self.partition_label.value() if format_type == "fat32" or format_type == "exfat": name = name.upper()[:11] @@ -494,6 +495,7 @@ class IsoDumper(basedialog.BaseDialog): self.dialog.pollEvent() time.sleep(0.5) if self.iface.state: + self.progress.setValue(100) message = _("The device was formatted successfully.") rc = True else: |
