[gvfs/wip/oholy/gtimeval-gdatetime: 5/11] http: Remove usage of deprecated GTimeVal



commit 16a6dfd56d5e136befaa58e76ba8668086062feb
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Sep 16 17:04:34 2019 +0200

    http: Remove usage of deprecated GTimeVal
    
    GTimeVal is deprecated. Let's remove it in order to prevent the
    deprecation warnings.

 daemon/gvfsbackendhttp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c
index 81ebe27e..aca1525d 100644
--- a/daemon/gvfsbackendhttp.c
+++ b/daemon/gvfsbackendhttp.c
@@ -583,13 +583,12 @@ file_info_from_message (SoupMessage *msg,
   if (text)
     {
       SoupDate *sd;
-      GTimeVal tv;
 
       sd = soup_date_new_from_string(text);
       if (sd)
         {
-          soup_date_to_timeval (sd, &tv);
-         g_file_info_set_modification_time (info, &tv);
+          g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED, soup_date_to_time_t (sd));
+          g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, 0);
           soup_date_free (sd);
         }
     }


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