[gedit] metadata manager: retry another blind fix



commit 61cb7de441b8a15df67554341e50386e7a920f87
Author: Paolo Borelli <pborelli gnome org>
Date:   Tue Jul 22 11:14:53 2014 +0200

    metadata manager: retry another blind fix
    
    this time it may even compile...

 gedit/gedit-metadata-manager.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-metadata-manager.c b/gedit/gedit-metadata-manager.c
index e9e1a08..99fd83d 100644
--- a/gedit/gedit-metadata-manager.c
+++ b/gedit/gedit-metadata-manager.c
@@ -38,7 +38,7 @@ typedef struct _Item Item;
 
 struct _Item
 {
-       guint64          atime; /* time of last access */
+       gint64           atime; /* time of last access in seconds since January 1, 1970 UTC */
 
        GHashTable      *values;
 };
@@ -181,7 +181,7 @@ parseItem (xmlDocPtr doc, xmlNodePtr cur)
 
        item = g_new0 (Item, 1);
 
-       item->atime = g_ascii_strtoull ((char *)atime, NULL, 0);
+       item->atime = g_ascii_strtoll ((char *)atime, NULL, 0);
 
        item->values = g_hash_table_new_full (g_str_hash,
                                              g_str_equal,
@@ -330,7 +330,7 @@ gedit_metadata_manager_get (GFile       *location,
        if (item == NULL)
                return NULL;
 
-       item->atime = g_date_time_to_unix ();
+       item->atime = g_get_real_time () / 1000;
 
        if (item->values == NULL)
                return NULL;
@@ -408,7 +408,7 @@ gedit_metadata_manager_set (GFile       *location,
                                     key);
        }
 
-       item->atime = g_date_time_to_unix ();
+       item->atime = g_get_real_time () / 1000;
 
        g_free (uri);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]