Fix extended plugin handling PR

Fixes problems found in PR #999
This commit is contained in:
Philip Flohr
2018-08-02 07:51:13 +02:00
committed by Dmitry Podgorny
parent a5a7db9e2b
commit 054267d738
3 changed files with 25 additions and 19 deletions

View File

@@ -162,6 +162,7 @@ plugins_install_all(const char *const path)
}
}
curr = g_slist_next(curr);
g_string_free(error_message, TRUE);
}
g_slist_free_full(contents, g_free);
@@ -180,7 +181,11 @@ plugins_uninstall(const char *const plugin_name)
g_string_append(target_path, plugin_name);
GFile *file = g_file_new_for_path(target_path->str);
GError *error = NULL;
return g_file_delete(file, NULL, &error);
gboolean result = g_file_delete(file, NULL, &error);
g_object_unref(file);
g_error_free(error);
g_string_free(target_path, TRUE);
return result;
}
gboolean