[prev in list] [next in list] [prev in thread] [next in thread] 

List:       enlightenment-svn
Subject:    E CVS: libs/ecore sebastid
From:       enlightenment-cvs () lists ! sourceforge ! net
Date:       2005-09-29 17:50:04
Message-ID: E1EL2Xk-0000YD-4d () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : libs/ecore

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


Modified Files:
	ecore_file.c ecore_file_path.c 


Log Message:
Move realpath to ecore_file_can_exec, since it always makes sense there.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_file/ecore_file.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- ecore_file.c	12 Sep 2005 02:42:39 -0000	1.15
+++ ecore_file.c	29 Sep 2005 17:50:03 -0000	1.16
@@ -193,9 +193,11 @@
    static gid_t        gid = -1;
    struct stat st;
    int                 ok;
+   char                buf[PATH_MAX];
 
    if (!file) return 0;
-   if (stat(file, &st) < 0) return 0;
+   if (!realpath(file, buf)) return 0;
+   if (stat(buf, &st) < 0) return 0;
 
    ok = 0;
    if (!have_uid) uid = getuid();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_file/ecore_file_path.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ecore_file_path.c	29 Sep 2005 17:25:38 -0000	1.12
+++ ecore_file_path.c	29 Sep 2005 17:50:04 -0000	1.13
@@ -61,16 +61,16 @@
 ecore_file_app_installed(const char *exe)
 {
    char *dir;
-   char  buf[PATH_MAX], buf2[PATH_MAX];
+   char  buf[PATH_MAX];
 
    if (!exe) return 0;
-   if (realpath(exe, buf) && ecore_file_can_exec(buf)) return 1;
+   if (ecore_file_can_exec(exe)) return 1;
 
    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, exe);
-	if (realpath(buf, buf2) && ecore_file_can_exec(buf2)) return 1;
+	if (ecore_file_can_exec(buf)) return 1;
      }
    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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic