Repository navigation
fix(devices): stop locking built-in card readers on Windows - #242
Merged
Merged
Conversation
Windows classified disks by bus type alone, so a PCIe SD card reader with removable media counted as an internal disk. The removable flag now counts on card-reader buses; NVMe, UFS and SAS stay internal. Fixes #241
A reader on a bus other than USB fell back to the USB icon. A model name containing "card reader" now gets the SD icon.
🧪 Test BuildsVersion:
How to run these test buildsmacOS (Apple Silicon): xattr -dr com.apple.quarantine /Applications/Armbian\ Imager.appWindows: Linux: chmod +x ./*.AppImage && ./*.AppImage
# or
sudo apt install ./*.debUpdates are disabled in these test builds. Artifacts expire in 14 days. |
2 tasks done
cargo audit now denies rustix 1.1.3 as unsound (RUSTSEC-2026-0486, xattr reads with a zero-length buffer). 1.1.6 has the fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On Windows a laptop's built-in PCIe SD reader showed up locked as a system disk. Since #159 I only looked at the bus type to keep internal NVMe and SATA disks hidden, and this reader is on a bus that is neither USB nor SD.
I now also trust the removable-media flag Windows reports, but only on buses where a card reader can appear. NVMe, UFS and SAS ignore it, and the disk that hosts Windows is always a system disk. The session log gets one line per disk, so the next report can be read from the paste. NVMe drives in Thunderbolt enclosures stay locked for now.
Fixes #241
How Has This Been Tested?
npm run lintandnpx tsc --noEmit -p tsconfig.app.jsonpasscargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings(also for the Windows target) andcargo testpassChecklist: