From c6e93168af984e558d591df24d247863cb9963a3 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 23 Jun 2021 16:11:13 +0800 Subject: [PATCH] fix: readme hidden --- common.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common.php b/common.php index b011a80..dbf58a2 100644 --- a/common.php +++ b/common.php @@ -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