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



commit 21a98bc9d09cad2f23331f8ed66de9aa5eadaf7c
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Sep 16 17:05:03 2019 +0200

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

 daemon/gvfsbackendmtp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index c4f1e855..fe26b8b5 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -1292,8 +1292,8 @@ get_file_info (GVfsBackend *backend,
 
   g_file_info_set_size (info, file->filesize);
 
-  GTimeVal modtime = { file->modificationdate, 0 };
-  g_file_info_set_modification_time (info, &modtime);
+  g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED, file->modificationdate);
+  g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, 0);
 
   g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, TRUE);
   g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, TRUE);


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