Skip to content
Snippets Groups Projects
Commit 154b456d authored by Jeremy Soller's avatar Jeremy Soller Committed by GitHub
Browse files

Merge pull request #28 from ids1024/mtimefuse

fuse: allow setting mtime to earlier time
parents 8737f194 5a1aaadd
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ impl Filesystem for Fuse {
if let Some(mtime) = mtime {
match self.fs.node(block) {
Ok(mut node) => if mtime.sec as u64 > node.1.mtime || (mtime.sec as u64 == node.1.mtime && mtime.nsec as u32 > node.1.mtime_nsec) {
Ok(mut node) => {
node.1.mtime = mtime.sec as u64;
node.1.mtime_nsec = mtime.nsec as u32;
if let Err(err) = self.fs.write_at(node.0, &node.1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment