Skip to content

Commit

Permalink
handle 404 for dir
Browse files Browse the repository at this point in the history
  • Loading branch information
imWildCat committed Feb 18, 2023
1 parent 1ff5211 commit a86f1a8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/services/webdav/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,17 @@ impl Accessor for WebdavBackend {
DirStream::new(&self.root, path, result, args.limit()),
))
}
StatusCode::NOT_FOUND if path.ends_with('/') => Ok((
RpList::default(),
DirStream::new(
&self.root,
path,
Multistatus {
response: Vec::new(),
},
args.limit(),
),
)),
_ => Err(parse_error(resp).await?),
}
}
Expand Down

0 comments on commit a86f1a8

Please sign in to comment.