diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2013-12-30 13:30:41 +0200 |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2014-01-23 12:13:50 +0200 |
commit | 947ca911a6e522f8158dfb007cd306ce40d1266c (patch) | |
tree | 3d2e172a069644b679780a19a148500e684dbdb7 | |
parent | cf884c045b939f2ec148ae0b9c69d123b55fef4e (diff) | |
download | gvfs-947ca911a6e522f8158dfb007cd306ce40d1266c.tar.gz |
ftp: Set etag::value
Set etag::value based on the file's modification time.
https://bugzilla.gnome.org/show_bug.cgi?id=721234
-rw-r--r-- | daemon/gvfsftpdircache.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/daemon/gvfsftpdircache.c b/daemon/gvfsftpdircache.c index 72137781..365b11bb 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); |