nautilus r14875 - trunk/eel
- From: awalton svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14875 - trunk/eel
- Date: Thu, 22 Jan 2009 12:49:19 +0000 (UTC)
Author: awalton
Date: Thu Jan 22 12:49:19 2009
New Revision: 14875
URL: http://svn.gnome.org/viewvc/nautilus?rev=14875&view=rev
Log:
2009-01-21 A. Walton <awalton gnome org>
* eel-debug-drawing.c (eel_debug_show_pixbuf_in_external_viewer):
Really fix bug #568630, replace mktemp() with mkstemp().
Modified:
trunk/eel/ChangeLog
trunk/eel/eel-debug-drawing.c
Modified: trunk/eel/eel-debug-drawing.c
==============================================================================
--- trunk/eel/eel-debug-drawing.c (original)
+++ trunk/eel/eel-debug-drawing.c Thu Jan 22 12:49:19 2009
@@ -285,15 +285,19 @@
char *file_name;
gboolean save_result;
int ignore;
+ int fd;
g_return_if_fail (pixbuf != NULL);
g_return_if_fail (viewer_name != NULL);
file_name = g_strdup ("/tmp/eel-debug-png-file-XXXXXX");
- if (mktemp (file_name) != file_name) {
+ fd = mkstemp (file_name);
+ if (fd == -1) {
g_free (file_name);
file_name = g_strdup_printf ("/tmp/isis-debug-png-file-%d", getpid ());
+ } else {
+ close (fd);
}
save_result = eel_gdk_pixbuf_save_to_file (pixbuf, file_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]