On Sun May 7 21:56:46 2023 +0000, Zebediah Figura wrote:
I agree that Wine shouldn't advertise `file:` URI handlers to the
desktop environment, because Windows programs can't use Unix file paths. I just pushed a new patch that adds the `file` "protocol" to the blacklist. We may not want to translate protocol handlers for file: for other reasons, but it's worth pointing out that Wine actually does allow using Unix paths. You can try it yourself by opening cmd and running `explorer /some/unix/path/`. [Note that this translation isn't specific to cmd or anything; it's done at the ntdll level.]
That's really interesting, I didn't know that Wine could do that. I tried it and `explorer file:///some/unix/path/` works too.
However, as you alluded to, there is a bigger reason why we don't want desktop integration for file URIs: Associating a program with the file "protocol" is like associating it with all file types, which would be obnoxious and lend itself to the same kinds of abuse as associating a program with .com, .exe, or .msi. (Incidentally, desktop integration for third-party associations with .bat really shouldn't be allowed either.)
I've pushed a new patch that changes the comment in is_type_banned to explain the above reasoning for prohibiting desktop integration for file URI associations. Please let me know if you have any further concerns.