chitralverma commented on code in PR #6232: URL: https://github.com/apache/opendal/pull/6232#discussion_r2135156914
########## 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: okay, i understand, let me revert this. > There is no guarantee that the list can retrieve metadata for all services. may be this can be a note somewhere in `core` on the Lister/ list() ? -- 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