diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2016-12-21 01:15:30 +0300 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2017-01-19 01:32:21 +0100 |
commit | eea5f7e7c7827ef4a26f6f60fd6c8e0c4c604cc3 (patch) | |
tree | b9bc63bbad35f8c3f3d890d7d2ae6999a11f733f /tdeio | |
parent | 075aa0a11d5177d6bc646dee45b24722a97d3e38 (diff) | |
download | tdelibs-eea5f7e7c7827ef4a26f6f60fd6c8e0c4c604cc3.tar.gz tdelibs-eea5f7e7c7827ef4a26f6f60fd6c8e0c4c604cc3.zip |
tdeio/kmimemagic: remove MAGIC_CONTINUE flag
This resolves bug 2713
The MAGIC_CONTINUE flag resulted in a malformed mimemagic responses
like "application/x-executable\012- application/octet-stream"
instead of just "application/x-executable".
This string being unparsed then caused the KMimeType::findByURL() to
fallback to application/octet-stream for nearly every mimetype.
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit f54496a1f2d99bea12af3db999a53515109f99a3)
Diffstat (limited to 'tdeio')
-rw-r--r-- | tdeio/tdeio/kmimemagic.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tdeio/tdeio/kmimemagic.cpp b/tdeio/tdeio/kmimemagic.cpp index ba5a8dd0a..42f4d676c 100644 --- a/tdeio/tdeio/kmimemagic.cpp +++ b/tdeio/tdeio/kmimemagic.cpp @@ -192,7 +192,7 @@ void process(struct config_rec* conf, const TQString & fn) { KDE_struct_stat sb; TQCString fileName = TQFile::encodeName( fn ); - int magic_flags = MAGIC_CONTINUE|MAGIC_ERROR|MAGIC_MIME_TYPE/*|MAGIC_DEBUG*/; + int magic_flags = MAGIC_ERROR|MAGIC_MIME_TYPE/*|MAGIC_DEBUG*/; if (conf->followLinks) { magic_flags |= MAGIC_SYMLINK; } @@ -299,7 +299,7 @@ KMimeMagicResult *KMimeMagic::findBufferType(const TQByteArray &array) { conf->resultBuf = MIME_BINARY_ZEROSIZE; } else { - int magic_flags = MAGIC_CONTINUE|MAGIC_ERROR|MAGIC_MIME_TYPE/*|MAGIC_DEBUG*/; + int magic_flags = MAGIC_ERROR|MAGIC_MIME_TYPE/*|MAGIC_DEBUG*/; if (conf->followLinks) { magic_flags |= MAGIC_SYMLINK; } |