Reduced code for filename trim
Signed-off-by: Magnus Walbeck <mw@mwalbeck.org>
This commit is contained in:
parent
eadc1ac637
commit
3d99ec6832
1 changed files with 1 additions and 3 deletions
|
@ -169,9 +169,7 @@ class Detection implements IMimeTypeDetector {
|
|||
$fileName = basename($path);
|
||||
|
||||
// remove leading dot on hidden files with a file extension
|
||||
if (strpos($fileName, '.') === 0 && strpos($fileName, '.', 1)) {
|
||||
$fileName = substr($fileName, 1);
|
||||
}
|
||||
$fileName = ltrim($fileName, '.');
|
||||
|
||||
// note: leading dot doesn't qualify as extension
|
||||
if (strpos($fileName, '.') > 0) {
|
||||
|
|
Loading…
Reference in a new issue