GtkFileLauncher: generated paths not recognized on Win32
Steps to reproduce
- Use the new API
gtk_file_launcher_launch()
to launch fileC:\TEMP\test.txt
- Use the new API
gtk_file_launcher_launch()
to launch fileC:\TEMP\test.svg
Current behavior
- The default application Notepad starts and displays an error message:
The filename, directory name or volume label syntax is incorrect
- The default application Firefox starts and displays an error message:
The address wasn't understood
Firefox doesn't know how to open this address, because one of the following protocols (c) isn't associated with any program or is not allowed in this context.
Expected outcome
- Notepad opens
C:\TEMP\test.txt
without error - Firefox opens
C:\TEMP\test.svg
without error
Version information
- Windows 10
- mingw-w64-ucrt-x86_64-gtk4 = 4.10.1-1
Additional information
The used GFiles are valid, query_exists()
returns TRUE, load_contents(NULL)
works fine too.
I checked the command line generated by the GtkFileLauncher using the Windows tool wmic process get processid,commandline
and found:
C:/Windows/system32/NOTEPAD.EXE file:///C:/TEMP/test.txt
"C:\Program Files\Mozilla Firefox\firefox.exe" -osint -url C:/TEMP/test.svg
Probably GtkFileLauncher should try to pass Windows-style paths with backslash separators, instead of URIs.