fix: readme hidden

pull/368/head
qkqpttgf 2021-06-23 16:11:13 +08:00 committed by GitHub
parent 74bb87ef15
commit c6e93168af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -347,14 +347,14 @@ function main($path)
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1, 0, -1);
$files = $drive->list_files($path1);
}
if ($files['type']=='folder' && !$_SERVER['admin']) {
foreach ($files['list'] as $k => $v) {
if (isHideFile($k)) unset($files['list'][$k]);
}
}
if ($_GET['json']) {
// return a json
if ($files['type']=='folder' && !$_SERVER['admin']) {
foreach ($files['list'] as $k => $v) {
if (isHideFile($k)) unset($files['list'][$k]);
}
}
return output(json_encode($files), 200, ['Content-Type' => 'application/json']);
}
// random file