Skip to content

Commit 3146fcc

Browse files
authored
fix(services/webdav): Fix lister failing when root contains spaces (#5298)
1 parent 0f7497e commit 3146fcc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

core/src/services/webdav/lister.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,14 @@ impl oio::PageList for WebdavLister {
8080
path += "/"
8181
}
8282

83+
let decoded_path = percent_decode_path(&path);
84+
8385
// Ignore the root path itself.
84-
if self.core.root == path {
86+
if self.core.root == decoded_path {
8587
continue;
8688
}
8789

88-
let normalized_path = build_rel_path(&self.core.root, &path);
89-
let decoded_path = percent_decode_path(&normalized_path);
90+
let normalized_path = build_rel_path(&self.core.root, &decoded_path);
9091

9192
// HACKS! HACKS! HACKS!
9293
//
@@ -97,7 +98,8 @@ impl oio::PageList for WebdavLister {
9798
continue;
9899
}
99100

100-
ctx.entries.push_back(oio::Entry::new(&decoded_path, meta))
101+
ctx.entries
102+
.push_back(oio::Entry::new(&normalized_path, meta))
101103
}
102104
ctx.done = true;
103105

0 commit comments

Comments
 (0)