mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-27 16:26:32 +01:00
Do not set an extension if the type is a directory
This commit is contained in:
@@ -1439,12 +1439,13 @@ class AdminController extends AdminBaseController
|
||||
continue;
|
||||
}
|
||||
|
||||
$type = $fileInfo->getType();
|
||||
$payload = [
|
||||
'filename' => $fileInfo->getFilename(),
|
||||
'path' => $fileInfo->getPath(),
|
||||
'basename' => $fileInfo->getBasename(),
|
||||
'extension' => $fileInfo->getExtension(),
|
||||
'type' => $fileInfo->getType(),
|
||||
'extension' => $type === 'dir' ? '' : $fileInfo->getExtension(),
|
||||
'type' => $type,
|
||||
'modified' => $fileInfo->getMTime(),
|
||||
'size' => $fileInfo->getSize()
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user