mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Resolve #1883
This commit is contained in:
parent
70aebb4981
commit
45c8f71af0
1 changed files with 10 additions and 7 deletions
|
|
@ -43,6 +43,7 @@ abstract class MimeType
|
|||
\fclose($fp);
|
||||
}
|
||||
if ('application/zip' === \str_replace('/x-', '/', $mime)) {
|
||||
if (\class_exists('ZipArchive')) {
|
||||
$zip = new \ZipArchive();
|
||||
if ($zip->open($filename, \ZIPARCHIVE::RDONLY)) {
|
||||
if (false !== $zip->locateName('word/_rels/document.xml.rels')) {
|
||||
|
|
@ -53,6 +54,8 @@ abstract class MimeType
|
|||
}
|
||||
}
|
||||
}
|
||||
$mime = \str_replace('/x-', '/', $mime);
|
||||
}
|
||||
}
|
||||
return $mime ? static::detectDeeper($mime, $name ?: $filename) : null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue