From 300bad9092e0ddcae4a4137df087f5e32fbd6e00 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 10 May 2015 16:44:16 +0200 Subject: some more ctime, mtime fixes --- pgfuse.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pgfuse.c b/pgfuse.c index 5dc5f53..cbe937b 100644 --- a/pgfuse.c +++ b/pgfuse.c @@ -461,6 +461,10 @@ static int pgfuse_open( const char *path, struct fuse_file_info *fi ) } } + if( !data->noatime ) { + meta.atime = now( ); + } + res = psql_write_meta( conn, id, path, meta ); if( res < 0 ) { PSQL_ROLLBACK( conn ); RELEASE( conn ); @@ -960,6 +964,7 @@ static int pgfuse_ftruncate( const char *path, off_t offset, struct fuse_file_in } meta.size = offset; + meta.mtime = now( ); res = psql_write_meta( conn, fi->fh, path, meta ); if( res < 0 ) { @@ -1163,6 +1168,7 @@ static int pgfuse_chmod( const char *path, mode_t mode ) } meta.mode = mode; + meta.ctime = now( ); res = psql_write_meta( conn, id, path, meta ); if( res < 0 ) { @@ -1205,6 +1211,7 @@ static int pgfuse_chown( const char *path, uid_t uid, gid_t gid ) meta.uid = uid; meta.gid = gid; + meta.ctime = now( ); res = psql_write_meta( conn, id, path, meta ); if( res < 0 ) { -- cgit v1.2.3-54-g00ecf