From fc090b693032e89dc714b2c781572eac03dd36ef Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 31 May 2022 16:55:52 +0800 Subject: [PATCH] fix: not found dir when allow_upload is false --- src/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.rs b/src/server.rs index 775bdd9..bea6b6b 100644 --- a/src/server.rs +++ b/src/server.rs @@ -139,7 +139,7 @@ impl InnerService { self.handle_send_file(filepath, req.headers(), &mut res) .await? } - Method::GET if is_miss && path.ends_with('/') => { + Method::GET if allow_upload && is_miss && path.ends_with('/') => { self.handle_ls_dir(filepath, false, &mut res).await? } Method::OPTIONS => {