[gimp] app: GimpDataFactory: get the data's mtime in the function where it's needed
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: GimpDataFactory: get the data's mtime in the function where it's needed
- Date: Mon, 28 Dec 2015 15:49:06 +0000 (UTC)
commit 0ee649629e11451186bcdb0be70ed847e20adf67
Author: Michael Natterer <mitch gimp org>
Date: Mon Dec 28 16:46:08 2015 +0100
app: GimpDataFactory: get the data's mtime in the function where it's needed
app/core/gimpdatafactory.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimpdatafactory.c b/app/core/gimpdatafactory.c
index 98f04e8..b548144 100644
--- a/app/core/gimpdatafactory.c
+++ b/app/core/gimpdatafactory.c
@@ -99,7 +99,7 @@ static void gimp_data_factory_load_data (GimpDataFactory *factory,
GHashTable *cache,
gboolean dir_writable,
GFile *file,
- guint64 mtime,
+ GFileInfo *info,
GFile *top_directory);
@@ -840,14 +840,9 @@ gimp_data_factory_load_directory (GimpDataFactory *factory,
}
else if (file_type == G_FILE_TYPE_REGULAR)
{
- guint64 mtime;
-
- mtime = g_file_info_get_attribute_uint64 (info,
- G_FILE_ATTRIBUTE_TIME_MODIFIED);
-
gimp_data_factory_load_data (factory, context, cache,
dir_writable,
- child, mtime,
+ child, info,
top_directory);
}
@@ -865,12 +860,13 @@ gimp_data_factory_load_data (GimpDataFactory *factory,
GHashTable *cache,
gboolean dir_writable,
GFile *file,
- guint64 mtime,
+ GFileInfo *info,
GFile *top_directory)
{
const GimpDataFactoryLoaderEntry *loader = NULL;
GList *data_list = NULL;
GInputStream *input;
+ guint64 mtime;
gint i;
GError *error = NULL;
@@ -892,6 +888,9 @@ gimp_data_factory_load_data (GimpDataFactory *factory,
return;
insert:
+ mtime = g_file_info_get_attribute_uint64 (info,
+ G_FILE_ATTRIBUTE_TIME_MODIFIED);
+
if (cache)
{
GList *cached_data = g_hash_table_lookup (cache, file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]