From 5e0bb59907c9a5d9f700c9edbed77327a5ab9dfd Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Mon, 11 Mar 2024 18:58:28 +0800 Subject: [PATCH] Fix bug where parent directory is omitted --- php/get.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/get.php b/php/get.php index 187395c..31db735 100644 --- a/php/get.php +++ b/php/get.php @@ -38,7 +38,7 @@ function main(): void { foreach (scandir($directory) as $file) { if ($file === ".") continue; if ($category === "" && $file === "..") continue; - if (substr($file, 0, 1) === ".") continue; + if (substr($file, 0, 1) === "." && $file !== "..") continue; $path = add_seperator_ab("/", $category, $file); $is_dir = is_dir(ROOT_DIR.IMG_DIR.$path);