forked from enlightenment/efl
efreet: Don't check if path is a subdir
We don't recurse in extra_dirs, so we must store all paths explicit. SVN revision: 62582
This commit is contained in:
parent
1210e95895
commit
6ac66e7427
|
@ -35,12 +35,6 @@ static Eina_Hash *generic_name = NULL;
|
|||
static Eina_Hash *comment = NULL;
|
||||
static Eina_Hash *exec = NULL;
|
||||
|
||||
static int
|
||||
strcmplen(const void *data1, const void *data2)
|
||||
{
|
||||
return strncmp(data1, data2, eina_stringshare_strlen(data1));
|
||||
}
|
||||
|
||||
static int
|
||||
cache_add(const char *path, const char *file_id, int priority __UNUSED__, int *changed)
|
||||
{
|
||||
|
@ -335,7 +329,7 @@ main(int argc, char **argv)
|
|||
|
||||
for (j = 0; j < user_dirs->array_count; j++)
|
||||
{
|
||||
if (eina_list_search_unsorted_list(scanned, strcmplen, user_dirs->array[j]))
|
||||
if (eina_list_search_unsorted_list(scanned, EINA_COMPARE_CB(strcmp), user_dirs->array[j]))
|
||||
continue;
|
||||
if (!ecore_file_is_dir(user_dirs->array[j])) continue;
|
||||
if (!cache_scan(user_dirs->array[j], NULL, priority, 0, &changed)) goto error;
|
||||
|
@ -352,7 +346,7 @@ main(int argc, char **argv)
|
|||
|
||||
EINA_LIST_FOREACH(extra_dirs, l, path)
|
||||
{
|
||||
if (eina_list_search_unsorted_list(scanned, strcmplen, path))
|
||||
if (eina_list_search_unsorted_list(scanned, EINA_COMPARE_CB(strcmp), path))
|
||||
continue;
|
||||
if (!ecore_file_is_dir(path)) continue;
|
||||
|
||||
|
|
|
@ -926,7 +926,7 @@ efreet_cache_desktop_add(Efreet_Desktop *desktop)
|
|||
for (i = 0; i < arr->array_count; i++)
|
||||
{
|
||||
/* Check if we already have this dir in cache */
|
||||
if (!strncmp(dir, arr->array[i], strlen(arr->array[i])))
|
||||
if (!strcmp(dir, arr->array[i]))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue