Index: tracker-thumbnailer.c =================================================================== --- tracker-thumbnailer.c (Revision 486) +++ tracker-thumbnailer.c (Arbeitskopie) @@ -23,7 +23,9 @@ #include #include +#include #include +#include #include #include #include @@ -69,6 +71,7 @@ int main (int argc, char *argv[]) { gchar *uri; + gchar realname[MAXPATHLEN]; struct stat stat_info; gchar *mtime; md5_state_t hash_state; @@ -106,8 +109,14 @@ return EXIT_FAILURE; } + /* g_filename_to_uri needs an absolute filename */ + if (!realpath (argv[1], realname)) { + g_printerr("could not resolve absolute pathname for %s\n", argv[1]); + return EXIT_FAILURE; + } + /* convert file name to URI */ - uri = g_filename_to_uri (argv[1], NULL, NULL); + uri = g_filename_to_uri (realname, NULL, NULL); /* get stat information on the file */ if (g_stat (argv[1], &stat_info) == -1) {