Repository navigation
fix(macos): keep mounted disk images out of both disks and volumes - #3
Merged
Merged
Conversation
systeminformation's diskLayout also returns mounted disk images on macOS (DMG app volumes, the iOS Simulator volume, open .dmg files) with type "Disk Image". Every entry became an SSD in the 3D scene, so a single-SSD Mac was drawn with nine drives. Filter those entries out where the disk list is built. No rendering code changes; on Windows/Linux the filter matches nothing. Refs #2
Filtering diskLayout fixed the 3D scene and the parts list, but the insights panel is driven by volumes, which still held every mounted disk image — so the right-hand "System check" panel warned about disks that do not exist. diskLayout already tells us which /dev nodes are disk images, so reuse that to skip the matching filesystems.
Owner
|
@yuxino Thanks a lot for taking the time to investigate this and submit a fix! 🙌 Really appreciate the detailed investigation and testing, especially the part about filtering both Thanks for contributing to the project! 🚀 |
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.
Fixes #2
Problem
On macOS,
systeminformationreports mounted disk images — installed app DMGs, the Xcode / iOS Simulator volume, any open.dmg— alongside real drives. They come back withtype: "Disk Image"and were treated as hardware, so a single-SSD Mac was drawn with nine drives and the app warned about disks that do not exist.Annotated — every red box is a phantom entry, in the 3D view and in the parts list:
Change
diskLayoutis filtered once, and that same set of devices is reused to skip the matching filesystems infsSize:The devices line up exactly: a
diskLayoutentry withdevice: "disk6"corresponds to thefsSizeentry/dev/disk6s1, which is the iOS Simulator volume.The right-hand panel
The first commit here only filtered
diskLayout. That fixed the 3D view and the parts list, but the "System check" panel kept complaining, because it is driven byvolumes, which was untouched:volumesgoes from 18 to 10 on this machine, and the five "is running out of space" warnings disappear. (The paths in the BEFORE panel are blacked out because they name the local apps that were mounted.)Tested
disks9 → 1,volumes18 → 10;/Volumes/,CoreSimulatorandrunning out of spaceno longer appear anywhere in the rendered page.pnpm typecheckpasses.type: "Disk Image"never occurs there, so both filters match nothing and behaviour is unchanged.