From 6a816fa8577a5b689ea43d41f6f6f23fce4c9a6d Mon Sep 17 00:00:00 2001 From: filesite Date: Fri, 28 Oct 2022 11:28:52 +0800 Subject: [PATCH] Bug fix: get filename with extension in some condition --- lib/DirScanner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DirScanner.php b/lib/DirScanner.php index 573a933..7a3d834 100644 --- a/lib/DirScanner.php +++ b/lib/DirScanner.php @@ -175,7 +175,7 @@ Class DirScanner { //获取文件名,不含文件后缀 private function getFilenameWithoutExtension($realpath) { - return preg_replace('/\.[a-z]+$/i', '', $this->basename($realpath)); + return preg_replace('/\.[^\.]+$/i', '', $this->basename($realpath)); } //根据路径生成目录数组