| Summary: | Platform.launch doesn't work on gio only systems. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Alexander Kurtakov <akurtakov> | ||||
| Component: | SWT | Assignee: | Alexander Kurtakov <akurtakov> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Silenio Quarti <Silenio_Quarti> | ||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | arunkumar.thondapu, gheorghe | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.8 M4 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 206099 [details]
The patch
There is a public git_repo available to ease future merges. The commit is http://fedorapeople.org/gitweb?p=akurtakov/public_git/eclipse.platform.swt.git;a=commitdiff;h=804ccbc5af46d99e0a5fe26da847914a9b2a7ecf Patch is good. Thanks Alex. Does it make sense to call g_file_new_for_commandline_arg() in Program.gio_execute() as well? Fixed http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=413c9491a928162b65715cf4be7506ad03721c18 (In reply to comment #3) > Patch is good. Thanks Alex. > > Does it make sense to call g_file_new_for_commandline_arg() in > Program.gio_execute() as well? > In Program.gio_execute there is check for local/remote and using the g_file_new_for_[uri|path] Probably this can be simplified to a single call with g_file_new_for_commandline_arg but the current implementation is just fine because there is a check whether the app in question can load from uris and acting appropriately. FWIW, not much would be gained by doing that. My last comment was not clear enough. Not much would be gained by using g_file_new_for_commandline_arg because there should be found another way to distinguish the case when an app doesn't support uris but an uri is given, i.e. reshuffling the code for no obvious win. Hi Alex, thanks for the explanation. I understand the code in launch is not broken. The only reason one would change it is to make the code consistent between launch and execute, but it is ok to leave it the way it is. |
Currently gio_launch uses g_file_new_for_path function but it works for local paths only and fails for remote (http://, ftp:// and etc.). The correct function to use is g_file_new_for_commandline_arg which handles both local and remote paths/uris. This can't be reproduced on systems that have gnome_vfs because launch function will fallback to gnome_24_launch. The attached patch is against master but it would be nice to be backported for Indigo SR2 because there are more and more systems that miss libgnome(and friends). This bug was identified because of azureus/vuze failing to start on the soon to be released Fedora 16 because it uses Program.launch("http://....).