Cannot open directories with associated application (i.e. Windows Explorer)
Submitted by John Lindgren
Created attachment 349853 Make opening directories work
The attached patch fixes several related issues that are preventing directories from being opened (via e.g. gtk_show_uri()) on Windows.
Issue #1 (closed): A content-type of "inode/directory" is explicitly assigned to directories as a special case (most other content types are file extensions), but this case is not handled in the registry lookup code. The registry doesn't have a key for "inode/directory" but it does have one for "Folder" (also "File Folder", not sure which one we should use).
Issue #2: In some cases (including the "Folder" case) g_win32_app_info_supports_uris() and g_win32_app_info_supports_files() can both return FALSE. In this case we should assume that the application does not support URIs and give it local file paths if possible.
Issue #3: The code is currently translating all backslashes in the command-line to forward slashes. This breaks e.g. Windows Explorer, which will open "C:\Windows" but will not open "C:/Windows". Forward slashes are traditionally used for option switches since the DOS days, so we should not be using them for path delimiters.
Attachment 349853, "Make opening directories work":