mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Resolve #878
This commit is contained in:
parent
271065fe44
commit
5b1404ffac
1 changed files with 8 additions and 6 deletions
|
|
@ -40,7 +40,8 @@ abstract class MimeType
|
|||
\fclose($fp);
|
||||
}
|
||||
if ('application/zip' === \str_replace('/x-', '/', $mime)) {
|
||||
$zip = new \ZipArchive($filename);
|
||||
$zip = new \ZipArchive();
|
||||
if ($zip->open($filename, \ZIPARCHIVE::RDONLY)) {
|
||||
if (false !== $zip->locateName('word/_rels/document.xml.rels')) {
|
||||
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
||||
}
|
||||
|
|
@ -49,6 +50,7 @@ abstract class MimeType
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $mime ? static::detectDeeper($mime, $name ?: $filename) : null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue