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)) {
gboolean with_filemanage r (GtkWidget * window,
const gchar * file,
gboolean open_parent) ntext * ctx = NULL;
open_file_
{
GDesktopAppInfo * d_app_info;
GKeyFile * key_file;
GdkAppLaunchCo
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: TEST_IS_ DIR)) { TEST_IS_ REGULAR) ) {
if (open_parent == TRUE && g_file_test (file, G_FILE_
should be:
if (open_parent == TRUE && g_file_test (file, G_FILE_