Skip to content

Commit

Permalink
fix: access
Browse files Browse the repository at this point in the history
  • Loading branch information
ho-229 committed May 22, 2024
1 parent 4c0000c commit 83b837d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion bin/ofs/src/fuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions bin/ofs/tests/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 83b837d

Please sign in to comment.