gedit r6442 - in trunk: . gedit
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6442 - in trunk: . gedit
- Date: Sun, 24 Aug 2008 15:25:36 +0000 (UTC)
Author: pborelli
Date: Sun Aug 24 15:25:35 2008
New Revision: 6442
URL: http://svn.gnome.org/viewvc/gedit?rev=6442&view=rev
Log:
2008-08-24 Paolo Borelli <pborelli katamail com>
* gedit/gedit-document.c (_gedit_document_check_externally_modified):
make sure the mtime attribute is set before using it.
Modified:
trunk/ChangeLog
trunk/gedit/gedit-document.c
Modified: trunk/gedit/gedit-document.c
==============================================================================
--- trunk/gedit/gedit-document.c (original)
+++ trunk/gedit/gedit-document.c Sun Aug 24 15:25:35 2008
@@ -938,6 +938,7 @@
{
GFile *gfile;
GFileInfo *info;
+ GTimeVal timeval;
g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE);
@@ -947,15 +948,18 @@
}
gfile = g_file_new_for_uri (doc->priv->uri);
- info = g_file_query_info (gfile, G_FILE_ATTRIBUTE_TIME_MODIFIED, G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ info = g_file_query_info (gfile,
+ G_FILE_ATTRIBUTE_TIME_MODIFIED,
+ G_FILE_QUERY_INFO_NONE,
+ NULL, NULL);
g_object_unref (gfile);
-
- if (info == NULL)
+
+ if (info == NULL ||
+ !g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED))
{
return FALSE;
}
- GTimeVal timeval;
g_file_info_get_modification_time (info, &timeval);
g_object_unref (info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]