From 83b837db8341d448d49ee35e015808cf52ae9faf Mon Sep 17 00:00:00 2001 From: Ho 229 Date: Wed, 22 May 2024 16:05:25 +0800 Subject: [PATCH] fix: access --- bin/ofs/src/fuse.rs | 1 - bin/ofs/tests/file.rs | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/ofs/src/fuse.rs b/bin/ofs/src/fuse.rs index 191809b2a2b..6f87e3051f1 100644 --- a/bin/ofs/src/fuse.rs +++ b/bin/ofs/src/fuse.rs @@ -641,7 +641,6 @@ impl PathFilesystem for Fuse { async fn access(&self, _req: Request, path: &OsStr, mask: u32) -> Result<()> { log::debug!("access(path={:?}, mask=0x{:x})", path, mask); - self.check_flags(mask)?; self.op .stat(&path.to_string_lossy()) .await diff --git a/bin/ofs/tests/file.rs b/bin/ofs/tests/file.rs index dacdc7f68a3..6e55351e1b7 100644 --- a/bin/ofs/tests/file.rs +++ b/bin/ofs/tests/file.rs @@ -64,10 +64,14 @@ fn test_file_append(ctx: &mut OfsTestContext) { file.write_all(TEST_TEXT.as_bytes()).unwrap(); drop(file); + thread::sleep(Duration::from_secs(1)); + let mut file = File::options().append(true).open(&path).unwrap(); file.write_all(b"test").unwrap(); drop(file); + thread::sleep(Duration::from_secs(1)); + let mut file = File::open(&path).unwrap(); let mut buf = String::new(); file.read_to_string(&mut buf).unwrap();