Skip to content

Commit

Permalink
fix: fix rust 1.76 error due to temporary value being dropped (#5071)
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome authored Aug 30, 2024
1 parent 3b50fdb commit 309d3eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/services/fs/lister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ impl oio::BlockingList for FsLister<std::fs::ReadDir> {
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))
}
}

0 comments on commit 309d3eb

Please sign in to comment.