Comment 30 for bug 1971168

Revision history for this message
In , Lissyx+mozillians (lissyx+mozillians) wrote :

(In reply to Alexandre LISSY :gerard-majax from comment #2)
> `Failed to open` comes from https://github.com/flatpak/xdg-desktop-portal/blob/e3ca5567a2dbb5b763a383bba5ff1c0437a7e851/src/documents.c#L91-L92 called from https://github.com/flatpak/xdg-desktop-portal/blob/e3ca5567a2dbb5b763a383bba5ff1c0437a7e851/src/file-chooser.c#L121
>
> From the asserts, it means that somehow `path` ends up `nullptr`: https://github.com/flatpak/xdg-desktop-portal/blob/e3ca5567a2dbb5b763a383bba5ff1c0437a7e851/src/documents.c#L79-L82
>
> ```
> (gdb) call g_file_get_uri (file)
> XDP: No background permissions found: Le d\u00e9lai d\u2019attente est d\u00e9pass\u00e9
> $3 = 0x7fffe8008110 "smb://192.168.1.36/documents/Patches/QPdfPresenterConsole-2.7.0-Darwin-x86_64.zip"
> (gdb) call g_file_get_uri_scheme (file)
> $4 = 0x7fffec00d140 "smb"
> (gdb) call g_file_get_path (file)
> XDP: Checking background permissions
> $5 = 0x0
> (gdb)
> ```

It looks like it is done on purpose: https://github.com/flatpak/xdg-desktop-portal/blob/fe9c5a11a199c966b32f6b7327136782544b845e/src/xdg-desktop-portal.c#L380-L381