Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Feb 23, 2024
1 parent bd4a661 commit bed6b3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/services/webdav/lister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ impl oio::PageList for WebdavLister {
let oes = self.multistates.response.clone();

for res in oes {
let path = res.href.trim_start_matches(&self.server_path);
let path = match res.href.strip_suffix(&self.server_path) {
Some(p) => p,
None => &res.href,
};
let path = if path.is_empty() { "" } else { path };

// Ignore the root path itself.
if self.root == path {
Expand Down

0 comments on commit bed6b3a

Please sign in to comment.