diff --git a/plugins/baser-core/src/Service/ThemesService.php b/plugins/baser-core/src/Service/ThemesService.php index 22f24757df..8255d5af0c 100644 --- a/plugins/baser-core/src/Service/ThemesService.php +++ b/plugins/baser-core/src/Service/ThemesService.php @@ -148,12 +148,11 @@ public function add(array $postData): string } $name = $postData['file']->getClientFileName(); $postData['file']->moveTo(TMP . $name); - $srcDirName = basename($name, '.zip'); $zip = new BcZip(); if (!$zip->extract(TMP . $name, TMP)) { throw new BcException(__d('baser_core', 'アップロードしたZIPファイルの展開に失敗しました。')); } - + $srcDirName = $zip->topArchiveName; $dstName = $srcName = Inflector::camelize($srcDirName); if (preg_match('/^(.+?)([0-9]+)$/', $srcName, $matches)) { $baseName = $matches[1];