diff -rudp thunar-archive-plugin-0.3.1.orig/thunar-archive-plugin/tap-backend.c thunar-archive-plugin-0.3.1/thunar-archive-plugin/tap-backend.c --- thunar-archive-plugin-0.3.1.orig/thunar-archive-plugin/tap-backend.c 2014-02-21 20:37:51.000000000 -0800 +++ thunar-archive-plugin-0.3.1/thunar-archive-plugin/tap-backend.c 2014-02-21 22:54:36.000000000 -0800 @@ -370,17 +370,51 @@ tap_backend_mime_wrapper (GAppInfo *mime filename = g_strdup_printf (LIBEXECDIR G_DIR_SEPARATOR_S "thunar-archive-plugin" G_DIR_SEPARATOR_S "%s.tap", base_name); /* check if the wrapper script exists */ - if (!g_file_test (filename, G_FILE_TEST_IS_EXECUTABLE)) + if (g_file_test (filename, G_FILE_TEST_IS_EXECUTABLE)) { - /* no wrapper then */ + g_free (base_name); + return filename; + } + + /* check if the .tap can be found by treating this as a thunar-vfs custom desktop file */ + dot = strstr (base_name, "-usercreated"); + if (G_UNLIKELY (dot != NULL)) + { + *dot = '\0'; g_free (filename); - filename = NULL; + filename = g_strdup_printf (LIBEXECDIR G_DIR_SEPARATOR_S "thunar-archive-plugin" G_DIR_SEPARATOR_S "%s.tap", base_name); + + if (g_file_test (filename, G_FILE_TEST_IS_EXECUTABLE)) + { + g_free (base_name); + return filename; + } + + *dot = '-'; } - /* cleanup */ + /* check if the .tap can be found by treating this as a gio custom desktop file */ + if (G_UNLIKELY (!strncmp (base_name, "userapp-", 8))) + { + dot = strchr (base_name + 8, '-'); + if (G_LIKELY (dot != NULL)) + { + *dot = '\0'; + g_free (filename); + filename = g_strdup_printf (LIBEXECDIR G_DIR_SEPARATOR_S "thunar-archive-plugin" G_DIR_SEPARATOR_S "%s.tap", base_name + 8); + + if (g_file_test (filename, G_FILE_TEST_IS_EXECUTABLE)) + { + g_free (base_name); + return filename; + } + } + } + g_free (base_name); + g_free (filename); - return filename; + return NULL; }