On Thu, Oct 18, 2012 at 11:12 AM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> eina: Check if we can open dir first
>
> Author: englebass
> Date: 2012-10-18 02:12:14 -0700 (Thu, 18 Oct 2012)
> New Revision: 78172
> Trac: http://trac.enlightenment.org/e/changeset/78172
>
> Modified:
> trunk/efl/src/lib/eina/eina_file.c
>
> Modified: trunk/efl/src/lib/eina/eina_file.c
> ===================================================================
> --- trunk/efl/src/lib/eina/eina_file.c 2012-10-18 09:12:04 UTC (rev 78171)
> +++ trunk/efl/src/lib/eina/eina_file.c 2012-10-18 09:12:14 UTC (rev 78172)
> @@ -889,6 +889,7 @@
> #ifdef HAVE_DIRENT_H
> Eina_File_Direct_Iterator *it;
> size_t length;
> + DIR *dirp;
>
> EINA_SAFETY_ON_NULL_RETURN_VAL(dir, NULL);
>
> @@ -896,18 +897,17 @@
> if (length < 1)
> return NULL;
>
> + dirp = opendir(dir);
> + if (!dirp)
> + return NULL;
> +
> it = calloc(1, sizeof(Eina_File_Direct_Iterator) + length);
> if (!it)
closedir() should not be called here ?
Vincent
> return NULL;
>
> EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
>
> - it->dirp = opendir(dir);
> - if (!it->dirp)
> - {
> - free(it);
> - return NULL;
> - }
> + it->dirp = dirp;
>
> if (length + _eina_name_max(it->dirp) + 2 >= EINA_PATH_MAX)
> {
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel