Skip to content

Commit

Permalink
fix(services/webdav): Fix lister failing when root contains spaces (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
skrimix authored Nov 7, 2024
1 parent 0f7497e commit 3146fcc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/src/services/webdav/lister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ impl oio::PageList for WebdavLister {
path += "/"
}

let decoded_path = percent_decode_path(&path);

// Ignore the root path itself.
if self.core.root == path {
if self.core.root == decoded_path {
continue;
}

let normalized_path = build_rel_path(&self.core.root, &path);
let decoded_path = percent_decode_path(&normalized_path);
let normalized_path = build_rel_path(&self.core.root, &decoded_path);

// HACKS! HACKS! HACKS!
//
Expand All @@ -97,7 +98,8 @@ impl oio::PageList for WebdavLister {
continue;
}

ctx.entries.push_back(oio::Entry::new(&decoded_path, meta))
ctx.entries
.push_back(oio::Entry::new(&normalized_path, meta))
}
ctx.done = true;

Expand Down

0 comments on commit 3146fcc

Please sign in to comment.