summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-03-18 23:40:03 +0100
committerCedric BAIL <cedric.bail@samsung.com>2013-03-19 15:15:46 +0900
commit9e745d4a2c8080f56d79df49b1bdffe9e41f66b6 (patch)
treeb6ec99bce90069181301c9547a37d02eae6a74c1 /src/lib/ecore_evas
parentb6318788216cda81f13cbba8de3f2606bf90b1d0 (diff)
efl: add macro to swap Windows and Unix path separators.
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r--src/lib/ecore_evas/ecore_evas_module.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c
index 0194bd2973..90b12478ab 100644
--- a/src/lib/ecore_evas/ecore_evas_module.c
+++ b/src/lib/ecore_evas/ecore_evas_module.c
@@ -102,10 +102,10 @@ _ecore_evas_engine_init(void)
102 for (j = 0; j < ((sizeof (paths) / sizeof (char*)) - 1); ++j) 102 for (j = 0; j < ((sizeof (paths) / sizeof (char*)) - 1); ++j)
103 for (i = j + 1; i < sizeof (paths) / sizeof (char*); ++i) 103 for (i = j + 1; i < sizeof (paths) / sizeof (char*); ++i)
104 if (paths[i] && paths[j] && !strcmp(paths[i], paths[j])) 104 if (paths[i] && paths[j] && !strcmp(paths[i], paths[j]))
105 { 105 {
106 free(paths[i]); 106 free(paths[i]);
107 paths[i] = NULL; 107 paths[i] = NULL;
108 } 108 }
109 109
110 for (i = 0; i < sizeof (paths) / sizeof (char*); ++i) 110 for (i = 0; i < sizeof (paths) / sizeof (char*); ++i)
111 if (paths[i]) 111 if (paths[i])
@@ -154,20 +154,23 @@ _ecore_evas_available_engines_get(void)
154 154
155 EINA_LIST_FOREACH(_engines_paths, l, path) 155 EINA_LIST_FOREACH(_engines_paths, l, path)
156 { 156 {
157 it = eina_file_direct_ls(path); 157 it = eina_file_direct_ls(path);
158 158
159 if (it) 159 if (it)
160 { 160 {
161 EINA_ITERATOR_FOREACH(it, info) 161 EINA_ITERATOR_FOREACH(it, info)
162 { 162 {
163 char tmp[PATH_MAX]; 163 char tmp[PATH_MAX];
164 snprintf(tmp, sizeof (tmp), "%s/%s/" ECORE_EVAS_ENGINE_NAME, 164 snprintf(tmp, sizeof (tmp), "%s/%s/" ECORE_EVAS_ENGINE_NAME,
165 info->path, MODULE_ARCH); 165 info->path, MODULE_ARCH);
166 166
167 if (_file_exists(tmp)) 167 if (_file_exists(tmp))
168 { 168 {
169 const char *name; 169 const char *name;
170 170
171#ifdef _WIN32
172 EVIL_PATH_SEP_WIN32_TO_UNIX(info->path);
173#endif
171 name = strrchr(info->path, '/'); 174 name = strrchr(info->path, '/');
172 if (name) name++; 175 if (name) name++;
173 else name = info->path; 176 else name = info->path;
@@ -246,9 +249,9 @@ _ecore_evas_available_engines_get(void)
246#endif 249#endif
247 } 250 }
248 } 251 }
249 } 252 }
250 eina_iterator_free(it); 253 eina_iterator_free(it);
251 } 254 }
252 } 255 }
253 256
254 _engines_available = result; 257 _engines_available = result;