@@ -271,7 +271,7 @@ impl OpenedFile {
271
271
let written = writer. write ( offset, data) . await ?;
272
272
273
273
// update the file size ,mtime and atime
274
- let end = offset + data . len ( ) as u64 ;
274
+ let end = offset + written as u64 ;
275
275
if end > self . file_stat . size {
276
276
self . file_stat . size = end;
277
277
}
@@ -365,7 +365,7 @@ pub trait FileWriter: Sync + Send {
365
365
}
366
366
}
367
367
368
- /// SimpleFileSystem is a simple implementation for the file system.
368
+ /// DefaultRawFileSystem is a simple implementation for the file system.
369
369
/// it is used to manage the file metadata and file handle.
370
370
/// The operations of the file system are implemented by the PathFileSystem.
371
371
/// Note: This class is not use in the production code, it is used for the demo and testing
@@ -676,13 +676,13 @@ impl FileEntryManager {
676
676
}
677
677
678
678
fn insert ( & mut self , parent_file_id : u64 , file_id : u64 , path : & str ) {
679
- let file = FileEntry {
679
+ let file_entry = FileEntry {
680
680
file_id,
681
681
parent_file_id,
682
682
path : path. to_string ( ) ,
683
683
} ;
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 ) ;
686
686
}
687
687
688
688
fn remove ( & mut self , path : & str ) {
0 commit comments