On Thu, Jul 8, 2010 at 12:39 AM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> @@ -382,8 +382,8 @@
>        if (directory && strcmp(directory, current_directory))
>        {
>                elm_gengrid_clear(em->thumb_browser);
> -               free(current_directory);
> -               current_directory = strdup(directory);
> +               eina_stringshare_del(current_directory);
> +               current_directory = eina_stringshare_add(directory);
>                eina_list_free(em->images);
>                em->images = NULL;
>                ephoto_populate_thumbnails();

you could make this:

if (eina_stringshare_replace(&current_directory, directory))
{
... /* code without eina_stringshare_del + add */ ...
}


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to