Do realpath on last element too

SVN revision: 54227
This commit is contained in:
Sebastian Dransfeld 2010-11-06 14:44:11 +00:00
parent 38c55d2170
commit 3ee4664f39
1 changed files with 10 additions and 1 deletions

View File

@ -264,7 +264,16 @@ efreet_dirs_get(const char *key, const char *fallback)
p = strchr(s, EFREET_PATH_SEP);
}
if (!eina_list_search_unsorted(dirs, EINA_COMPARE_CB(strcmp), s))
dirs = eina_list_append(dirs, (void *)eina_stringshare_add(s));
{
// resolve path properly/fully to remove path//path2 to
// path/path2, path/./path2 to path/path2 etc.
char *ts = ecore_file_realpath(s);
if (ts)
{
dirs = eina_list_append(dirs, (void *)eina_stringshare_add(ts));
free(ts);
}
}
return dirs;
}