From a66114ea405c715f4c7a315f906c7e6faba90747 Mon Sep 17 00:00:00 2001 From: englebass Date: Sat, 6 Nov 2010 14:44:11 +0000 Subject: [PATCH] Do realpath on last element too git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@54227 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/efreet_base.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/efreet_base.c b/src/lib/efreet_base.c index 93b6fd3..e247e88 100644 --- a/src/lib/efreet_base.c +++ b/src/lib/efreet_base.c @@ -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; } -- 2.7.4