gedit r6494 - in trunk: . gedit
- From: jessevdk svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6494 - in trunk: . gedit
- Date: Sat, 6 Sep 2008 15:25:52 +0000 (UTC)
Author: jessevdk
Date: Sat Sep 6 15:25:52 2008
New Revision: 6494
URL: http://svn.gnome.org/viewvc/gedit?rev=6494&view=rev
Log:
* gedit/gedit-gio-document-saver.c: fixed but in checking for externally
modified for new files (ignore NOT_FOUND error), fixes bug #551126
Modified:
trunk/ChangeLog
trunk/gedit/gedit-gio-document-saver.c
Modified: trunk/gedit/gedit-gio-document-saver.c
==============================================================================
--- trunk/gedit/gedit-gio-document-saver.c (original)
+++ trunk/gedit/gedit-gio-document-saver.c Sat Sep 6 15:25:52 2008
@@ -638,14 +638,18 @@
return;
}
- gedit_debug_message (DEBUG_SAVER, "Error getting modification: %s", error->message);
+ /* it's perfectly fine if the file doesn't exist yet */
+ if (error->code != G_IO_ERROR_NOT_FOUND)
+ {
+ gedit_debug_message (DEBUG_SAVER, "Error getting modification: %s", error->message);
- async_failed (async, error);
- return;
+ async_failed (async, error);
+ return;
+ }
}
/* check if the mtime is > what we know about it (if we have it) */
- if (g_file_info_has_attribute (info,
+ if (info != NULL && g_file_info_has_attribute (info,
G_FILE_ATTRIBUTE_TIME_MODIFIED))
{
GTimeVal mtime;
@@ -669,7 +673,8 @@
}
}
- g_object_unref (info);
+ if (info != NULL)
+ g_object_unref (info);
/* modification check passed, start write */
begin_write (async);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]