From 247e608ce44a2106d968c6e812890085bdcde165 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 22 Mar 2020 15:50:21 +0800 Subject: [PATCH] fix fix fix bug.... --- function/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/function/common.php b/function/common.php index 385e847..2a9bd45 100644 --- a/function/common.php +++ b/function/common.php @@ -937,7 +937,7 @@ function fetch_files($path = '/') global $exts; $path1 = path_format($path); $path = path_format($_SERVER['list_path'] . path_format($path)); - if (substr($path,-1)=='/') $path=substr($path,0,-1); + if ($path!='/'&&substr($path,-1)=='/') $path=substr($path,0,-1); if (!($files = getcache('path_' . $path))) { // https://docs.microsoft.com/en-us/graph/api/driveitem-get?view=graph-rest-1.0 // https://docs.microsoft.com/zh-cn/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http