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 423160 - t-s-t: opening of external applications is broken
t-s-t: opening of external applications is broken
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Search Tool
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jamie McCracken
Jamie McCracken
Depends on:
Blocks:
 
 
Reported: 2007-03-27 00:25 UTC by Michael Biebl
Modified: 2007-07-21 22:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Biebl 2007-03-27 00:25:01 UTC
Please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415705
as reference.

The current code in t-s-t for launching external applications is
in tracker-search-tool-callbacks.c, line 544:569

1.) we first check if the file actually exists (ok)
2.) we try to open the file using gnome-vfs
3.) if that fails, we try to *launch* the file
4.) if that fails, we check if the uri is a directory
5.) if it is!!! a directory, we try to open it with xdg-open, alternatively with nautilus

a better flow imho would be
1.) check for existence
2.) g_file_test(G_FILE_TEST_IS_EXECUTABLE)
3.) if true. launch it (launch_file)
4.) if false, try to open it with xdg_open
   no need to check for G_FILE_TEST_IS_DIR, xdg_open handles that as well
5.) if xdg-open fails, use gnome-vfs (open_file_with_application).
6.) If that fails, print error message.
Comment 1 Tshepang Lekhonkhobe 2007-07-19 13:53:59 UTC
this is what svn r680 looks like:

1. check for existence
2. if true, try to open it with xdg_open
3. if false, g_file_test(G_FILE_TEST_IS_EXECUTABLE)
4. if true, launch it (launch_file)
5. if false, use gnome-vfs (open_file_with_application)
6. if that fails, we check if the uri is a directory
7. if true, open with nautilus
8. if that fails, print error message.

Difference is that we check 1st with xdg_open before we check if the file can be launched. Is this also broken?
Comment 2 Michael Biebl 2007-07-19 14:32:36 UTC
No, I think the behaviour of current SVN is sane.