Skip to content

Commit a86f1a8

Browse files
committed
handle 404 for dir
1 parent 1ff5211 commit a86f1a8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/services/webdav/backend.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,17 @@ impl Accessor for WebdavBackend {
315315
DirStream::new(&self.root, path, result, args.limit()),
316316
))
317317
}
318+
StatusCode::NOT_FOUND if path.ends_with('/') => Ok((
319+
RpList::default(),
320+
DirStream::new(
321+
&self.root,
322+
path,
323+
Multistatus {
324+
response: Vec::new(),
325+
},
326+
args.limit(),
327+
),
328+
)),
318329
_ => Err(parse_error(resp).await?),
319330
}
320331
}

0 commit comments

Comments
 (0)