summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendgphoto2.c
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-09-16 17:03:21 +0200
committerOndrej Holy <oholy@redhat.com>2019-09-20 11:53:57 +0000
commit356302839b1fcf42c9071da1f21a7e9d6dc8fc17 (patch)
treecf5b71b9ad16d7497182f32b3ca2281d8e16b4b5 /daemon/gvfsbackendgphoto2.c
parent08ded2189540a4c09936a82333d86925fd967e0c (diff)
downloadgvfs-356302839b1fcf42c9071da1f21a7e9d6dc8fc17.tar.gz
gphoto2: Remove usage of deprecated GTimeVal
GTimeVal is deprecated. Let's remove it in order to prevent the deprecation warnings.
Diffstat (limited to 'daemon/gvfsbackendgphoto2.c')
-rw-r--r--daemon/gvfsbackendgphoto2.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c
index 7e50194a..ae59691e 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;
@@ -1011,12 +1010,10 @@ 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);
+ if (gp_info.file.fields & GP_FILE_INFO_MTIME) {
+ g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED, gp_info.file.mtime);
+ 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, gphoto2_backend->can_write);