Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_file


Modified Files:
        ecore_file_path.c 


Log Message:
Check if a full path is given as the argument.

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_file/ecore_file_path.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ecore_file_path.c   7 Sep 2005 08:57:08 -0000       1.4
+++ ecore_file_path.c   28 Sep 2005 01:28:22 -0000      1.5
@@ -60,28 +60,20 @@
 int
 ecore_file_app_installed(const char *app)
 {
-   int   found;
    char *dir;
    char  buf[PATH_MAX];
 
-   if (!app)
-     return 0;
+   if (!app) return 0;
+   if (ecore_file_exists(app) && ecore_file_can_exec(app)) return 1;
 
-   found = 0;
-
-   if (ecore_list_is_empty(__ecore_file_path_bin))
-     return 0;
+   if (ecore_list_is_empty(__ecore_file_path_bin)) return 0;
    ecore_list_goto_first(__ecore_file_path_bin);
-
    while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL)
      {
        snprintf(buf, sizeof(buf), "%s/%s", dir, app);
        if (ecore_file_exists(buf) && ecore_file_can_exec(buf))
-         {
-            found = 1;
-            break;
-         }
+         return 1;
      }
 
-   return found;
+   return 0;
 }




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to