I want to show Windows users how innovative the GTK FileChooseDialog is, when when checking again, I am a bit frustrated because the dialog doesn’t accept remote file URI.
When I press Ctrl + L and pass a HTTP, SFTP URL, I expect the dialog to recognize it, but not.
Is this a design decision of GTK team, or just some unawared bug?
Additionally, I’m not sure GIO—which is what we use to deal with local and remote files—supports SFTP on Windows like it does on Linux. As far as I know, GIO supports only local file: and http: URLs out of the box on Windows.
That dialog looks like a Save dialog; saving into a remote volume is not something that’s usually possible unless there’s a ton more functionality, like authentication and network capabilities to upload a file.
As a general rule, applications needs to be able to handle URLs—typically by using GIO—in order to be able to open and save files to remote volumes.
The file selection dialog does a bunch of validation checks; in this case, it is trying to get the file information and since it can’t, it is trying to recurse into the parent folder, and then fails again. The check is trying to catch things like selecting existing_file.txt/new-file.txt.
In practice, GtkFileChooserWidget is a massive state machine that makes a lot of assumptions, and it doesn’t deal very well with remote, complex URLs. We can probably fix some of this in GTK3, for instance by avoiding the recursive check if the entry contains a non-local URL. For GTK4, I’d rather nuke most of this stuff and replace it with a simplified widget.
FWIW, removing the ?t=… part gets it to work on my Linux box (tried with EOG): http://www.moit.gov.vn/documents/40266/0/ap1.jpg/bfda943e-f879-4cc6-bca0-fe1095e586d3. So there’s probably something bizarre going on somewhere indeed.