summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-05-10 16:44:16 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2015-05-10 16:44:16 +0200
commit300bad9092e0ddcae4a4137df087f5e32fbd6e00 (patch)
tree24477f8feaba22dc717111816ec8a73a20318a74
parent82d1eee6e23786c8e512e6f43eb451ee231f7a18 (diff)
downloadpgfuse-300bad9092e0ddcae4a4137df087f5e32fbd6e00.tar.gz
pgfuse-300bad9092e0ddcae4a4137df087f5e32fbd6e00.tar.bz2
some more ctime, mtime fixes
-rw-r--r--pgfuse.c7
1 files changed, 7 insertions, 0 deletions
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 ) {