[gvfs/wip/oholy/gtimeval-gdatetime: 3/10] gphoto2: Remove usage of deprecated GTimeVal



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

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

 daemon/gvfsbackendgphoto2.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index 7e50194a..83c607a8 100644
--- a/daemon/gvfsbackendgphoto2.c
+++ b/daemon/gvfsbackendgphoto2.c
@@ -807,7 +807,6 @@ file_get_info (GVfsBackendGphoto2 *gphoto2_backend,
   CameraFileInfo gp_info;
   char *full_path;
   GFileInfo *cached_info;
-  GTimeVal mtime;
   char *mime_type;
   GIcon *icon;
   unsigned int n;
@@ -1012,11 +1011,7 @@ file_get_info (GVfsBackendGphoto2 *gphoto2_backend,
   g_free (mime_type);
 
   if (gp_info.file.fields & GP_FILE_INFO_MTIME)
-    mtime.tv_sec = gp_info.file.mtime;
-  else
-    mtime.tv_sec = 0;
-  mtime.tv_usec = 0;
-  g_file_info_set_modification_time (info, &mtime);
+    g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED, gp_info.file.mtime);
 
   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, gphoto2_backend->can_write);


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