Skip to content
Snippets Groups Projects
Unverified Commit 5a1aaadd authored by Ian Douglas Scott's avatar Ian Douglas Scott
Browse files

fuse: allow setting mtime to earlier time

parent 8737f194
No related branches found
No related tags found
1 merge request!28fuse: allow setting mtime to earlier time
...@@ -136,7 +136,7 @@ impl Filesystem for Fuse { ...@@ -136,7 +136,7 @@ impl Filesystem for Fuse {
if let Some(mtime) = mtime { if let Some(mtime) = mtime {
match self.fs.node(block) { 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 = mtime.sec as u64;
node.1.mtime_nsec = mtime.nsec as u32; node.1.mtime_nsec = mtime.nsec as u32;
if let Err(err) = self.fs.write_at(node.0, &node.1) { 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