X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=src%2Fclient%2Ffuse%2Fop_utime.c;h=99f74fb0fe786fd009cd89d9cfbf8d6e6226514e;hb=003667cc279a05f618a1187243a9d2692293b96d;hp=e106bbd56752efd469be3fb33943549afba1fb20;hpb=319383d38a890d88e9c593093c1168ba2a0a7f85;p=captive.git 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);