Xuanwo commented on code in PR #6232: URL: https://github.com/apache/opendal/pull/6232#discussion_r2126959344
########## core/src/services/fs/lister.rs: ########## @@ -68,14 +78,26 @@ impl oio::List for FsLister<tokio::fs::ReadDir> { ); let ft = de.file_type().await.map_err(new_std_io_error)?; - let entry = if ft.is_dir() { + let (path, mode) = if ft.is_dir() { // Make sure we are returning the correct path. - oio::Entry::new(&format!("{rel_path}/"), Metadata::new(EntryMode::DIR)) + (&format!("{rel_path}/"), EntryMode::DIR) } else if ft.is_file() { - oio::Entry::new(&rel_path, Metadata::new(EntryMode::FILE)) + (&rel_path, EntryMode::FILE) } else { - oio::Entry::new(&rel_path, Metadata::new(EntryMode::Unknown)) + (&rel_path, EntryMode::Unknown) }; + + let meta = tokio::fs::metadata(self.root.join(path)) Review Comment: Hi, please don't change this. This will make the list run several times slower than before. Users who need content_length should call stat themselves. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@opendal.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org