File picker dialog shows "The folder contents could not be displayed" error when a file path is pasted.
When you have a path to a file copied, and attempt to paste that path into the "Open File" picker dialog, you get a confusing error message dialog, stating "The folder contents could not be displayed: Operation not supported".
This specifically appears to be a problem when the pasted path is a path to a file. If instead it is a path to a directory, the file picker dialog will immediately navigate to the directory (Although see #779 for a case where that can fail). But if a file path is pasted, you get this error - it seems to be "Operation not supported" because you can't open a file as a directory.
The expected behaviour would probably be one of the following two options:
- Navigate to the parent folder of the file, and select the file in the file list.
- Instead of navigating immediately to the pasted path, open the location entry (same as Ctrl-L) and paste the file path there.
The latter option would be more useful in other error cases, e.g. if one or more of the path components could not be found, since it gives the ability for the user to see what was pasted (it might not have been what they expected) and correct any errors/typos.
This issue affects both Gtk 4 and Gtk 3 (tested on 4.10.3 and 3.24.36)