From 562d0b76429bccfbf4a66e509632063d99e18147 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 6 Oct 2014 16:19:57 -0500 Subject: Fix loading of additional mime magic files This resolves Bug 656 (cherry picked from commit 62bfcbe4780e5b08aee6a16895f5e508f0646bd2) --- kio/kio/kmimemagic.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'kio') diff --git a/kio/kio/kmimemagic.cpp b/kio/kio/kmimemagic.cpp index 871a262a2..362dd3d45 100644 --- a/kio/kio/kmimemagic.cpp +++ b/kio/kio/kmimemagic.cpp @@ -150,7 +150,6 @@ struct config_rec { int accuracy; magic_t magic; - TQStringList databases; KMimeMagicUtimeConf * utimeConf; }; @@ -159,9 +158,7 @@ struct config_rec { * apprentice - load configuration from the magic file. */ int KMimeMagic::apprentice( const TQString& magicfile ) { - conf->databases.clear(); - conf->databases.append(magicfile); - return magic_load(conf->magic, conf->databases[0].latin1()); + return magic_load(conf->magic, magicfile.latin1()); } /* @@ -242,9 +239,7 @@ KMimeMagic::~KMimeMagic() { } bool KMimeMagic::mergeConfig(const TQString & _configfile) { - conf->databases.append(_configfile); - TQString merged_databases = conf->databases.join(":"); - if (magic_load(conf->magic, merged_databases.latin1()) == 0) { + if (magic_load(conf->magic, _configfile.latin1()) == 0) { return true; } else { -- cgit v1.2.1