[gthumb/ext] do not change the time_modified info when saving embedded data
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext] do not change the time_modified info when saving embedded data
- Date: Sun, 6 Sep 2009 17:16:40 +0000 (UTC)
commit 9fc91d19b4f4d592460ce2fd87e2e41c3425aa76
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Sep 6 19:16:05 2009 +0200
do not change the time_modified info when saving embedded data
extensions/exiv2/gth-metadata-provider-exiv2.c | 17 +++++++++++++++++
gthumb/gth-string-list.c | 5 +++++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/extensions/exiv2/gth-metadata-provider-exiv2.c b/extensions/exiv2/gth-metadata-provider-exiv2.c
index 312da9c..4733951 100644
--- a/extensions/exiv2/gth-metadata-provider-exiv2.c
+++ b/extensions/exiv2/gth-metadata-provider-exiv2.c
@@ -125,6 +125,8 @@ gth_metadata_provider_exiv2_write (GthMetadataProvider *self,
NULL,
&error))
{
+ GFileInfo *tmp_info;
+
g_write_file (file_data->file,
FALSE,
G_FILE_CREATE_NONE,
@@ -132,6 +134,21 @@ gth_metadata_provider_exiv2_write (GthMetadataProvider *self,
size,
NULL,
&error);
+
+ tmp_info = g_file_info_new ();
+ g_file_info_set_attribute_uint64 (tmp_info,
+ G_FILE_ATTRIBUTE_TIME_MODIFIED,
+ g_file_info_get_attribute_uint64 (file_data->info, G_FILE_ATTRIBUTE_TIME_MODIFIED));
+ g_file_info_set_attribute_uint32 (tmp_info,
+ G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC,
+ g_file_info_get_attribute_uint32 (file_data->info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC));
+ g_file_set_attributes_from_info (file_data->file,
+ tmp_info,
+ G_FILE_QUERY_INFO_NONE,
+ NULL,
+ NULL);
+
+ g_object_unref (tmp_info);
}
if (buffer != NULL)
diff --git a/gthumb/gth-string-list.c b/gthumb/gth-string-list.c
index 368806c..d17b33d 100644
--- a/gthumb/gth-string-list.c
+++ b/gthumb/gth-string-list.c
@@ -165,6 +165,11 @@ gth_string_list_equal (GthStringList *list1,
GList *keys2;
GList *scan;
+ if ((list1 == NULL) && (list2 == NULL))
+ return TRUE;
+ if ((list1 == NULL) || (list2 == NULL))
+ return FALSE;
+
keys1 = list1->priv->list;
keys2 = list2->priv->list;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]