Skip to content

Commit

Permalink
fix(service/fs): error due to temporary value being dropped (#5079)
Browse files Browse the repository at this point in the history
  • Loading branch information
miroim authored Aug 31, 2024
1 parent e869a70 commit 48e3bf7
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 @@ -94,14 +94,14 @@ impl oio::List for FsLister<tokio::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))
}
}

Expand Down

0 comments on commit 48e3bf7

Please sign in to comment.