File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
plugins/filesystem/local/src/Adapter Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ private function getPathInformation(string $path): \stdClass
385385 $ obj ->path = str_replace ($ this ->rootPath , '' , $ path );
386386 $ obj ->extension = !$ isDir ? File::getExt ($ obj ->name ) : '' ;
387387 $ obj ->size = !$ isDir ? filesize ($ path ) : '' ;
388- $ obj ->mime_type = MediaHelper::getMimeType ($ path , MediaHelper::isImage ($ obj ->name ));
388+ $ obj ->mime_type = ! $ isDir ? ( string ) MediaHelper::getMimeType ($ path , MediaHelper::isImage ($ obj ->name )) : '' ;
389389 $ obj ->width = 0 ;
390390 $ obj ->height = 0 ;
391391
@@ -400,7 +400,7 @@ private function getPathInformation(string $path): \stdClass
400400 return $ obj ;
401401 }
402402
403- if (MediaHelper::isImage ($ obj ->name )) {
403+ if (! $ isDir && MediaHelper::isImage ($ obj ->name )) {
404404 // Get the image properties
405405 try {
406406 $ props = Image::getImageFileProperties ($ path );
You can’t perform that action at this time.
0 commit comments