Support MIME subclasses in dialog scanning#1669
Support MIME subclasses in dialog scanning#1669norepro wants to merge 3 commits intopop-os:masterfrom
Conversation
|
testing the base example: boxes VM importing an ISO file this does not display ISO files in Boxes. i am unsure how to test beyond this, but the Boxes example does not work with this fix. |
You need to update https://github.com/pop-os/xdg-desktop-portal-cosmic to build with this updated cosmic-files before you will see GNOME Boxes behavior change. Updating cosmic-files alone is not enough because the COSMIC xdg portal does not spawn a process, it links it as a crate. It is currently locked to commit e779fc from Nov 20, 2025: https://github.com/pop-os/xdg-desktop-portal-cosmic/blob/master/Cargo.lock [[package]]
name = "cosmic-files"
version = "0.1.0"
source = "git+https://github.com/pop-os/cosmic-files#e779fc3dac1dd1de2b5c8aa54c6bd5f872169635"I tested it locally with a private build of Does the team have a method of testing the dialog functionality that does not require a new build of |
|
To test it locally with GNOME Boxes:
|
|
@norepro Thanks for providing the detailed testing steps! We can definitely build xdg-desktop-portal-cosmic locally to test this. For future changes like this, you'd also be welcome to open a draft PR against xdg-desktop-portal-cosmic with the Cargo.toml pointing to your cosmic-files branch (which would let us have our build server build it for testing), but it's of course not technically required. It does look like this PR has a small conflict. Could you fix that, and we can take another look? (I'm not sure if #1650, which caused the conflict, obsoletes or changes what you're doing here in any way.) |
Conflicts are resolved! The changes are complementary: the incoming change adds matching for To my knowledge, there is no common base for Thanks for the tip on the draft PR! It's a good idea and I'll see if I can get that published in the next day or two. |
|
Created a draft PR: pop-os/xdg-desktop-portal-cosmic#281 that pulls in this branch for testing. Regarding my commit bca195c above that removed '.git' from COSMIC projects generally seem to prefer no '.git' suffix, so I'm setting that here as well to make them align. Bigger picture it would be nice if the various projects agreed on syntax, especially since git crates are so common 🙂 |
Fix a bug where files with MIME types that are sub-classes of the filtered MIME types do not appear in the file dialog.
The file dialog only does strict equality checks when deciding which file MIME types match the filter list types. Augment the logic to also check if files are a subclass of the filter types.
Common examples fixed by this are ISO files. Modern Linux systems identify them as
application/vnd.efi.isowhich would not appear if the filter only had, say,application/x-cd-image. Now they do.Partially fixes #1596