From 003667cc279a05f618a1187243a9d2692293b96d Mon Sep 17 00:00:00 2001 From: lace <> Date: Wed, 28 Dec 2005 07:12:53 +0000 Subject: [PATCH] (*utime) should probably update even 'ctime' (to the current time). Fixed. --- src/client/fuse/op_utime.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/client/fuse/op_utime.c b/src/client/fuse/op_utime.c index e106bbd..99f74fb 100644 --- a/src/client/fuse/op_utime.c +++ b/src/client/fuse/op_utime.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "op_utime.h" /* self */ #include "main.h" @@ -49,14 +50,18 @@ GnomeVFSFileInfo file_info; file_info.valid_fields=0 |GNOME_VFS_FILE_INFO_FIELDS_ATIME - |GNOME_VFS_FILE_INFO_FIELDS_MTIME; + |GNOME_VFS_FILE_INFO_FIELDS_MTIME + |GNOME_VFS_FILE_INFO_FIELDS_CTIME; file_info.atime=buf->actime; file_info.mtime=buf->modtime; - /* It is probably not GnomeVFS compliant but still libcaptive compatible. - * GnomeVFS looks as assuming all the three fields set. - * GnomeVFS also does not check 'valid_fields' at all. + file_info.ctime=time(NULL); + /* Do not: * It is probably not GnomeVFS compliant but still libcaptive compatible. + * * GnomeVFS looks as assuming all the three fields set. + * * GnomeVFS also does not check 'valid_fields' at all. + * file_info.ctime=0; * Just sanity for sure. * + * file_info.valid_fields&=~GNOME_VFS_FILE_INFO_FIELDS_CTIME; + * as utime() syscall should really update 'ctime' to the current time. */ - file_info.ctime=0; /* Just sanity for sure. */ errvfsresult=captive_file_file_info_set(captive_file_object,&file_info,GNOME_VFS_SET_FILE_INFO_TIME); g_object_unref(captive_file_object); -- 1.8.3.1