Comment 3 for bug 1633953

Revision history for this message
Azurit3 (azurit3) wrote :

gboolean
open_file_with_filemanager (GtkWidget * window,
                            const gchar * file,
                            gboolean open_parent)
{
 GDesktopAppInfo * d_app_info;
 GKeyFile * key_file;
 GdkAppLaunchContext * ctx = NULL;
 GList * list = NULL;
 GAppInfo * g_app_info;
 GFile * g_file;
 gchar * command;
 gchar * contents;
 gchar * uri;
 gboolean result = TRUE;

 if (open_parent == TRUE && g_file_test (file, G_FILE_TEST_IS_DIR)) {
  gchar * folder = g_path_get_dirname (file);
  uri = g_filename_to_uri (folder, NULL, NULL);
  g_free (folder);
 }
 else {
  uri = g_filename_to_uri (file, NULL, NULL);
 }
...

The problem is at:
   if (open_parent == TRUE && g_file_test (file, G_FILE_TEST_IS_DIR)) {
should be:
   if (open_parent == TRUE && g_file_test (file, G_FILE_TEST_IS_REGULAR)) {