xdg-desktop-portal
xdg-desktop-portal copied to clipboard
Unauthorized mkdir breaks Firefox Snap "Save Page As ..." feature
When using Firefox under a Snap, the "Save Page As ..." feature when selecting "Complete page" is broken. More context in https://bugzilla.mozilla.org/show_bug.cgi?id=1774556
From what I could diagnose:
- Our "Save Page As ..." code will use GTK for selecting the target file
- Then it performs download using
nsITransfer - Next to the selected target file, a folder will be created to save the assets linked to the page
That last step fails on mkdir because the portal seems to deny it. Is this an actual sandbox limitation or a bug in the portal ?
If it is a limitation, are there alternatives or could we fix the sandbox to allow mkdir in that case ?
Attached is a small snap package reproducing the issue, via Python/DBus calls
Related: #463
Related: #463
Looks like this exact usecase was already mentionned in https://github.com/flatpak/xdg-desktop-portal/issues/463#issuecomment-987288031.
Yes. Let's keep track of this request there, and consider this a spiritual duplicate of #463.