diff --git a/fs-storage/src/file_storage.rs b/fs-storage/src/file_storage.rs index 276c808c..c98f825d 100644 --- a/fs-storage/src/file_storage.rs +++ b/fs-storage/src/file_storage.rs @@ -254,6 +254,10 @@ where let mut file = File::create(&self.path)?; file.write_all(serde_json::to_string_pretty(&self.data)?.as_bytes())?; file.flush()?; + // We need to manually set the modified time of the file + let new_timestamp = SystemTime::now(); + file.set_modified(new_timestamp)?; + file.sync_all()?; let new_timestamp = fs::metadata(&self.path)?.modified()?; if new_timestamp == self.modified {