After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 155386 - GnomeVFSMimeApplication command contains " "
GnomeVFSMimeApplication command contains " "
Status: RESOLVED WONTFIX
Product: gnome-vfs
Classification: Deprecated
Component: MIME and file/program mapping
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
: 155773 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-10-14 14:07 UTC by Fernando Herrera
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fernando Herrera 2004-10-14 14:07:59 UTC
When writing a patch for gnome-panel-screenshot I realized that when getting
application list for a concrete MIME type, the command field could contain an
empty space:
From eog.desktop, where:

Exec=eog %U

application->command is "eog ", so trying to use that string in, for example,
g_spawn_async ends with a "not found" error.

A possible fix would be
-               *p = '\0';
+               *(p - 1) = '\0';
but this for example would not catch the "bug-buddy --core" example. So maybe
the solution is always use ->command as a command line string. Is this the right
thing?
Comment 1 Fernando Herrera 2004-10-19 07:41:06 UTC
*** Bug 155773 has been marked as a duplicate of this bug. ***
Comment 2 Alexander Larsson 2004-10-19 13:07:32 UTC
TThe GnomeVFSMimeApplication abstraction is a part of an older system that
extracted the command argument as a separate thing. The new code takes the Exec
field from the desktop file and tries to make up the old-style command line. 

Anyway, you can't (and couldn't even in the old system) assume
application->command is just a binary name. Its a command line, including arguments.
Comment 3 Alexander Larsson 2004-10-19 13:08:21 UTC
Long term we want to get rid of GnomeVFSMimeApplication and rely more on desktop
files and the new mime specifications.
Comment 4 Marco Pesenti Gritti 2004-12-09 17:40:50 UTC
Since ->command is a command line I'm going to wontfix. In new code get_exec
should be used or where possible use launch api directly.