Double check that we're not adding addons twice
This commit is contained in:
parent
8353a15524
commit
dfb7225af5
1 changed files with 3 additions and 2 deletions
|
@ -843,7 +843,7 @@ addons_get_directories (AddonsKind kind)
|
||||||
{
|
{
|
||||||
path = g_build_path (G_DIR_SEPARATOR_S, *datadirs,
|
path = g_build_path (G_DIR_SEPARATOR_S, *datadirs,
|
||||||
PACKAGE_NAME, folder_name, NULL);
|
PACKAGE_NAME, folder_name, NULL);
|
||||||
if (g_access (path, X_OK) == 0)
|
if (g_slist_find (directories, path) == NULL && g_access (path, X_OK) == 0)
|
||||||
directories = g_slist_prepend (directories, path);
|
directories = g_slist_prepend (directories, path);
|
||||||
else
|
else
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
@ -888,6 +888,7 @@ addons_get_files (AddonsKind kind)
|
||||||
if (g_str_has_suffix (filename, file_extension))
|
if (g_str_has_suffix (filename, file_extension))
|
||||||
{
|
{
|
||||||
fullname = g_build_filename (dirname, filename, NULL);
|
fullname = g_build_filename (dirname, filename, NULL);
|
||||||
|
if (g_slist_find (files, fullname) == NULL)
|
||||||
files = g_slist_prepend (files, fullname);
|
files = g_slist_prepend (files, fullname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue