diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index a16278fce4..f88e1eb13d 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -813,6 +813,9 @@ string FileName::guessFormatFromContents() const // PKZIP static string const zipStamp = "PK"; + // ZIP containers (koffice, openoffice.org etc). + static string const nonzipStamp = "\008\0\0\0mimetypeapplication/"; + // compress static string const compressStamp = "\037\235"; @@ -840,7 +843,8 @@ string FileName::guessFormatFromContents() const if (prefixIs(str, gzipStamp)) { format = "gzip"; - } else if (stamp == zipStamp) { + } else if (stamp == zipStamp && + !contains(str, nonzipStamp)) { format = "zip"; } else if (stamp == compressStamp) { diff --git a/status.20x b/status.20x index 7d10fcd92a..f3f7afc6ce 100644 --- a/status.20x +++ b/status.20x @@ -137,6 +137,8 @@ What's new - Do not use \inputencoding for translated names of theorem-like environments if they can be actually encoded in the chosen document encoding (bug 7800). +- Do mot misdetect office file formats as zip (bug 7973). + * TEX2LYX