Re: gdk-pixbuf: *no* save xpm patch



At 10:53 01.11.00 +0200, Tor Lillqvist wrote:
>>        context->tempname = g_strdup ("/tmp/gdkpixbuf-xpm-tmp.XXXXXX");
>
>Also here we should use g_get_tmp_dir() and not hardcode /tmp. Plus
>the G_DIR_SEPARATOR stuff, and avoid double separators, as in
>io-tiff.c.
>
Yepp. Should have been more careful ...

>Maybe GLib should have a g_mkstemp_in_tmp_dir(void) (or whatever) that
>would handle the naming of the file and locating it in the preferred
>temp directory?
>
But than the filename wouldn't be owned by the caller anymore and the
ability to identify temp names would be lost.

What about g_get_tmp_filename("gdkpixbuf-xpm-tmp") to get the best of both
worlds?

	Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]