1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00

fix directory entry path

This commit is contained in:
belltoy 2018-01-13 08:37:27 +00:00
parent a9c71b2894
commit 781282897a

View File

@ -138,7 +138,7 @@ impl Responder for Directory {
for entry in self.path.read_dir()? {
if self.can_list(&entry) {
let entry = entry.unwrap();
let p = match entry.path().strip_prefix(&self.base) {
let p = match entry.path().strip_prefix(&self.path) {
Ok(p) => base.join(p),
Err(_) => continue
};