1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2025-01-06 15:28:54 +00:00

Merge pull request from belltoy/master

fix directory entry path
This commit is contained in:
Nikolay Kim 2018-01-13 11:16:53 -08:00 committed by GitHub
commit c043fd7912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
};