From abec1c242fa9df4dd418c57847f3e068f383bbdf Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Sun, 10 Mar 2024 15:09:19 +0800 Subject: [PATCH] Ignore hidden files --- php/get.php | 1 + 1 file changed, 1 insertion(+) diff --git a/php/get.php b/php/get.php index 3bdd069..187395c 100644 --- a/php/get.php +++ b/php/get.php @@ -38,6 +38,7 @@ function main(): void { foreach (scandir($directory) as $file) { if ($file === ".") continue; if ($category === "" && $file === "..") continue; + if (substr($file, 0, 1) === ".") continue; $path = add_seperator_ab("/", $category, $file); $is_dir = is_dir(ROOT_DIR.IMG_DIR.$path);