diff options
author | Ondrej Holy <oholy@redhat.com> | 2019-09-16 16:53:49 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2019-09-20 11:53:57 +0000 |
commit | 7284c529bfe948e390c186f573ae5e35f006969a (patch) | |
tree | 7de046274f7bb18ee1a0300b64252b584bd0ca7c /client | |
parent | 74ae9b632ab7bac03c722e380f667201ca38ad77 (diff) | |
download | gvfs-7284c529bfe948e390c186f573ae5e35f006969a.tar.gz |
fuse: Remove usage of deprecated GTimeVal
GTimeVal is deprecated. Let's remove it in order to prevent the
deprecation warnings.
Diffstat (limited to 'client')
-rw-r--r-- | client/gvfsfusedaemon.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c index 1ca6d121..00bd9129 100644 --- a/client/gvfsfusedaemon.c +++ b/client/gvfsfusedaemon.c @@ -536,11 +536,11 @@ file_info_get_attribute_as_int (GFileInfo *file_info, const gchar *attribute) #endif -static guint +static guint64 file_info_get_attribute_as_uint (GFileInfo *file_info, const gchar *attribute) { GFileAttributeType attribute_type; - guint uint_result; + guint64 uint_result; attribute_type = g_file_info_get_attribute_type (file_info, attribute); @@ -738,17 +738,14 @@ file_info_get_stat_mode (GFileInfo *file_info) static void set_attributes_from_info (GFileInfo *file_info, struct stat *sbuf) { - GTimeVal mod_time; - sbuf->st_mode = file_info_get_stat_mode (file_info); sbuf->st_size = g_file_info_get_size (file_info); sbuf->st_uid = daemon_uid; sbuf->st_gid = daemon_gid; - g_file_info_get_modification_time (file_info, &mod_time); - sbuf->st_mtime = mod_time.tv_sec; - sbuf->st_ctime = mod_time.tv_sec; - sbuf->st_atime = mod_time.tv_sec; + sbuf->st_mtime = file_info_get_attribute_as_uint (file_info, G_FILE_ATTRIBUTE_TIME_MODIFIED); + sbuf->st_ctime = sbuf->st_mtime; + sbuf->st_atime = sbuf->st_mtime; if (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_TIME_CHANGED)) sbuf->st_ctime = file_info_get_attribute_as_uint (file_info, G_FILE_ATTRIBUTE_TIME_CHANGED); |