From 74bb87ef15b3545eaa581c832b03d2b7561f5438 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 20 Jun 2021 17:57:08 +0800 Subject: [PATCH] fix: get hidden filename via json --- common.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common.php b/common.php index e72e950..b011a80 100644 --- a/common.php +++ b/common.php @@ -347,6 +347,11 @@ 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 -- GitLab