Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_file
Modified Files:
ecore_file.c
Log Message:
and really fix it now
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/ecore_file.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- ecore_file.c 15 Oct 2006 09:18:26 -0000 1.48
+++ ecore_file.c 15 Oct 2006 09:32:25 -0000 1.49
@@ -110,14 +110,16 @@
struct dirent *dp;
char path[PATH_MAX], buf[PATH_MAX];;
struct stat st;
-
+ int ret;
if (readlink(dir, buf, sizeof(buf)) > 0)
{
- ecore_file_unlink(dir);
+ return ecore_file_unlink(dir);
}
- else if (S_ISDIR(st.st_mode))
+ ret = stat(dir, &st);
+ if ((ret == 0) && (S_ISDIR(st.st_mode)))
{
+ ret = 1;
if (stat(dir, &st) == -1) return 0;
dirp = opendir(dir);
if (dirp)
@@ -127,17 +129,19 @@
if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, "..")))
{
snprintf(path, PATH_MAX, "%s/%s", dir, dp->d_name);
- ecore_file_recursive_rm(path);
+ if (!ecore_file_recursive_rm(path))
+ ret = 0;
}
}
closedir(dirp);
}
- ecore_file_rmdir(dir);
+ if (!ecore_file_rmdir(dir)) ret = 0;
+ return ret;
}
else
{
- if (stat(dir, &st) == -1) return 0;
- ecore_file_unlink(dir);
+ if (ret == -1) return 0;
+ return ecore_file_unlink(dir);
}
return 1;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs