fix change token not fetched

This commit is contained in:
OMGeeky
2024-04-14 13:25:05 +02:00
parent 3c37a55991
commit 5167c8ebd4
6 changed files with 87 additions and 10 deletions

View File

@@ -173,6 +173,13 @@ impl fuser::Filesystem for Filesystem {
) {
let id = self.get_id_from_ino(ino);
info!("Reading dir: {id:?}/{ino}");
if let Err(e) = utils::update::update(self) {
error!("Got an error during update in readdir: {}", e);
dbg!(e);
reply.error(libc::EIO);
return;
}
match id {
None => {}
Some(id) => {
@@ -225,6 +232,16 @@ mod errors {
mod utils {
use super::*;
use crate::filesystem::attributes::InodeAttributes;
pub mod update {
use super::*;
#[instrument(skip(fs))]
pub fn update(fs: &Filesystem) -> StdResult<(), FilesystemError> {
info!("Updating changes");
send_request!(fs.gdriver_client.update_changes(current_context(),))?
.map_err(GDriverServiceError::from)?;
Ok(())
}
}
pub mod lookup {
use super::*;
use crate::filesystem::attributes::InodeAttributes;