fix: index.html in non-english folder

pull/152/head
qkqpttgf 2020-11-17 16:15:00 +08:00 committed by GitHub
parent 22a4cc70c9
commit 826b3f7f1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2001,7 +2001,7 @@ function render_list($path = '', $files = '')
if (strpos(__DIR__, ':')) $slash = '\\'; if (strpos(__DIR__, ':')) $slash = '\\';
if (isset($files['children']['index.html']) && !$_SERVER['admin']) { if (isset($files['children']['index.html']) && !$_SERVER['admin']) {
$htmlcontent = fetch_files(spurlencode(path_format($path . '/index.html'),'/'))['content']; $htmlcontent = fetch_files(spurlencode(path_format(urldecode($path) . '/index.html'),'/'))['content'];
return output($htmlcontent['body'], $htmlcontent['stat']); return output($htmlcontent['body'], $htmlcontent['stat']);
} }
$path = str_replace('%20','%2520',$path); $path = str_replace('%20','%2520',$path);