Skip to content

Keep the selected drive by its whole path - #1067

Merged
mnadareski merged 3 commits into
SabreTools:masterfrom
gmipf:pr/14-keep-selected-drive
Oct 26, 2026
Merged

mnadareski merged 3 commits into
SabreTools:masterfrom
gmipf:pr/14-keep-selected-drive

Conversation

@gmipf

@gmipf gmipf commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

On Linux and macOS, the selected drive changes to another drive after "Scan for Discs", and after editing the parameters when the box next to them is ticked again. Both looked for the selected drive by the first character of its device path, which was the drive letter before drives used paths (d68175d). Every device path on Linux starts with / and every BSD name on macOS with d, so another drive starting with the same character was selected.

Both now look for the whole path first. Editing the parameters still falls back to the drive letter: on Windows, MPF gives DiscImageCreator and Dreamdump the whole path (E:\), but Aaru and Redumper only the letter (E: and E).

Measured on master (18cc680) and this branch by running MainViewModel as the window does, with the real drives and, for each run, a new configuration that only sets the paths of the dumping programs: Init, then for each drive with a disc, select it and run what "Scan for Discs" runs, and select it and process the parameters generated for Aaru, DiscImageCreator, Dreamdump and Redumper as ticking the box does.

  • Fedora Linux 44 VM, one drive (/dev/sg0 and /dev/sr0): with /dev/sr0 selected, master selects /dev/sg0 after both, with all four programs. This branch keeps /dev/sr0.
  • macOS 26.5.2 VM, two drives (disk1 and a USB drive as disk8): with disk8 selected, master selects disk1 after both, with all four programs. This branch keeps disk8.
  • Fedora Linux 44 with a physical drive, in the GUI of this branch: /dev/sr2 stays selected after "Scan for Discs".
  • Windows 11 VM, two drives (D:\ and E:\): master and this branch keep either drive selected after both. Without the fallback to the drive letter, editing the parameters selects D:\ instead of E:\ with Aaru and Redumper.

Prepared with AI assistance (Claude Opus 5.5) and reviewed before submission.

gmipf and others added 2 commits October 21, 2026 12:04
Scanning for discs and leaving the parameter editing looked for the
selected drive by the first character of its device path, which was the
drive letter before drives used paths. On Linux every device path starts
with "/" and on macOS every BSD name with "d", so the selection moved to
another drive, such as /dev/sg0 instead of /dev/sr0. Both now look for
the whole path first. Windows paths already differ in their first
character, and leaving the parameter editing still falls back to the
drive letter, which Aaru and Redumper are given without the rest of the
path, while DiscImageCreator and Dreamdump get the whole path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-drive

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mnadareski
mnadareski merged commit 93c91bd into SabreTools:master Oct 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants