summaryrefslogtreecommitdiffstats
path: root/kio
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2016-12-21 01:15:30 +0300
committerSlávek Banko <slavek.banko@axis.cz>2017-07-22 15:56:44 +0200
commitcc48df2a09bbdb6e83f52215b1a41c257d4820bc (patch)
tree4748fefe0154c66a27518df7d4ba316fa4f6c673 /kio
parenta8e88fd0056a53ef40209a7b5c06665180a59a5c (diff)
downloadtdelibs-cc48df2a09bbdb6e83f52215b1a41c257d4820bc.tar.gz
tdelibs-cc48df2a09bbdb6e83f52215b1a41c257d4820bc.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 'kio')
-rw-r--r--kio/kio/kmimemagic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kio/kio/kmimemagic.cpp b/kio/kio/kmimemagic.cpp
index 84d7d3887..d7b09dadb 100644
--- a/kio/kio/kmimemagic.cpp
+++ b/kio/kio/kmimemagic.cpp
@@ -189,7 +189,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;
}
@@ -296,7 +296,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;
}