Skip to content

Commit 33dc3bd

Browse files
committed
Update
1 parent 366c77a commit 33dc3bd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clients/filesystem-fuse/src/filesystem.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ impl OpenedFile {
271271
let written = writer.write(offset, data).await?;
272272

273273
// update the file size ,mtime and atime
274-
let end = offset + data.len() as u64;
274+
let end = offset + written as u64;
275275
if end > self.file_stat.size {
276276
self.file_stat.size = end;
277277
}
@@ -365,7 +365,7 @@ pub trait FileWriter: Sync + Send {
365365
}
366366
}
367367

368-
/// SimpleFileSystem is a simple implementation for the file system.
368+
/// DefaultRawFileSystem is a simple implementation for the file system.
369369
/// it is used to manage the file metadata and file handle.
370370
/// The operations of the file system are implemented by the PathFileSystem.
371371
/// Note: This class is not use in the production code, it is used for the demo and testing
@@ -676,13 +676,13 @@ impl FileEntryManager {
676676
}
677677

678678
fn insert(&mut self, parent_file_id: u64, file_id: u64, path: &str) {
679-
let file = FileEntry {
679+
let file_entry = FileEntry {
680680
file_id,
681681
parent_file_id,
682682
path: path.to_string(),
683683
};
684-
self.file_id_map.insert(file_id, file.clone());
685-
self.file_path_map.insert(path.to_string(), file);
684+
self.file_id_map.insert(file_id, file_entry.clone());
685+
self.file_path_map.insert(path.to_string(), file_entry);
686686
}
687687

688688
fn remove(&mut self, path: &str) {

0 commit comments

Comments
 (0)