[gvfs] ftp: Set etag::value
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] ftp: Set etag::value
- Date: Thu, 23 Jan 2014 10:13:46 +0000 (UTC)
commit 947ca911a6e522f8158dfb007cd306ce40d1266c
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Mon Dec 30 13:30:41 2013 +0200
ftp: Set etag::value
Set etag::value based on the file's modification time.
https://bugzilla.gnome.org/show_bug.cgi?id=721234
daemon/gvfsftpdircache.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsftpdircache.c b/daemon/gvfsftpdircache.c
index 7213778..365b11b 100644
--- a/daemon/gvfsftpdircache.c
+++ b/daemon/gvfsftpdircache.c
@@ -717,7 +717,15 @@ g_vfs_ftp_dir_cache_funcs_process (GInputStream * stream,
tv.tv_sec = mktime (&result.fe_time);
if (tv.tv_sec != -1)
- g_file_info_set_modification_time (info, &tv);
+ {
+ char *etag = g_strdup_printf ("%ld", tv.tv_sec);
+ g_file_info_set_attribute_string (info,
+ G_FILE_ATTRIBUTE_ETAG_VALUE,
+ etag);
+ g_free (etag);
+
+ g_file_info_set_modification_time (info, &tv);
+ }
g_vfs_ftp_dir_cache_entry_add (entry, file, info);
g_free (line);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]