Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into release-v0.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuanwo committed Jul 19, 2022
2 parents bd0b637 + b6dcae6 commit 554ab01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/http/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Builder {

pub(crate) fn insert_path(&mut self, path: &str) {
for (idx, _) in path.match_indices('/') {
let p = path[idx + 1..].to_string();
let p = path[..=idx].to_string();
if self.index.get(&p).is_none() {
debug!("insert path {} into index", p);
self.index.insert(p, ());
Expand Down Expand Up @@ -272,7 +272,7 @@ impl Backend {
let mut index = self.index.lock().expect("lock must succeed");

for (idx, _) in path.match_indices('/') {
let p = path[idx + 1..].to_string();
let p = path[..=idx].to_string();

if index.get(&p).is_none() {
debug!("insert path {} into index", p);
Expand Down Expand Up @@ -516,7 +516,7 @@ impl Accessor for Backend {
debug!("dir object {path:?} listed keys: {paths:?}");
Ok(Box::new(DirStream {
backend: Arc::new(self.clone()),
path: path.to_string(),
path: self.get_abs_path(path),
paths: paths.into_iter().collect(),
idx: 0,
}))
Expand Down

0 comments on commit 554ab01

Please sign in to comment.