diff --git a/core/src/services/fs/lister.rs b/core/src/services/fs/lister.rs index 9245cb82664..305a1214e28 100644 --- a/core/src/services/fs/lister.rs +++ b/core/src/services/fs/lister.rs @@ -94,14 +94,14 @@ impl oio::List for FsLister { meta }; - let p = if metadata.is_dir() { + let entry = if metadata.is_dir() { // Make sure we are returning the correct path. - &format!("{rel_path}/") + oio::Entry::new(&format!("{rel_path}/"), metadata) } else { - &rel_path + oio::Entry::new(&rel_path, metadata) }; - Ok(Some(oio::Entry::new(p, metadata))) + Ok(Some(entry)) } }