Enlightenment CVS committal Author : raster Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_file Modified Files: Ecore_File.h ecore_file_path.c Log Message: remove duplicate paths =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_file/Ecore_File.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- Ecore_File.h 3 Jan 2006 00:18:42 -0000 1.23 +++ Ecore_File.h 19 Jan 2006 09:32:18 -0000 1.24 @@ -87,6 +87,7 @@ EAPI void ecore_file_monitor_del(Ecore_File_Monitor *ecore_file_monitor); EAPI const char *ecore_file_monitor_path_get(Ecore_File_Monitor *ecore_file_monitor); + EAPI int ecore_file_path_dir_exists(const char *in_dir); EAPI int ecore_file_app_installed(const char *exe); EAPI Ecore_List *ecore_file_app_list(void); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_file/ecore_file_path.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- ecore_file_path.c 6 Jan 2006 18:46:30 -0000 1.17 +++ ecore_file_path.c 19 Jan 2006 09:32:18 -0000 1.18 @@ -46,7 +46,8 @@ if (!*p) { - ecore_list_append(path, strdup(last)); + if (!ecore_file_path_dir_exists(last)) + ecore_list_append(path, strdup(last)); last = p + 1; } } @@ -58,6 +59,19 @@ } EAPI int +ecore_file_path_dir_exists(const char *in_dir) +{ + char *dir; + + ecore_list_goto_first(__ecore_file_path_bin); + while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL) + { + if (!strcmp(dir, in_dir)) return 1; + } + return 0; +} + +EAPI int ecore_file_app_installed(const char *exe) { char *dir; ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs