Skip to content

Commit

Permalink
[VD:abstract] mimetype() file check only of elFinderVolumeLocalFileSy…
Browse files Browse the repository at this point in the history
…stem instance
  • Loading branch information
nao-pon committed Mar 5, 2020
1 parent e319b86 commit d122437
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion php/elFinderVolumeDriver.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4784,8 +4784,11 @@ protected function mimetype($path, $name = '', $size = null, $mime = null)
$name = $path;
$nameCheck = true;
}
if (!$this instanceof elFinderVolumeLocalFileSystem) {
$nameCheck = true;
}
$ext = (false === $pos = strrpos($name, '.')) ? '' : strtolower(substr($name, $pos + 1));
if ($size === null) {
if (!$nameCheck && $size === null) {
$size = file_exists($path) ? filesize($path) : -1;
}
if (!$nameCheck && is_readable($path) && $size > 0) {
Expand Down

0 comments on commit d122437

Please sign in to comment.