]> OzVa Git service - ozva-cloud/commitdiff
fix: not found dir when allow_upload is false
authorsigoden <sigoden@gmail.com>
Tue, 31 May 2022 08:55:52 +0000 (16:55 +0800)
committersigoden <sigoden@gmail.com>
Tue, 31 May 2022 08:55:52 +0000 (16:55 +0800)
src/server.rs

index 775bdd9507369e0adcf6aef1b889053f46aa7058..bea6b6bf42dc17499f0dcbcab205dc87c7c57027 100644 (file)
@@ -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 => {