-rw-r--r-- | library/mimetype.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/library/mimetype.cpp b/library/mimetype.cpp index e2e0dab..92fe5e6 100644 --- a/library/mimetype.cpp +++ b/library/mimetype.cpp | |||
@@ -243,14 +243,12 @@ void MimeType::loadExtensions(const QString& filename) | |||
243 | // new override old (though left overrides right) | 243 | // new override old (though left overrides right) |
244 | QStringList exts = (*extFor)[id]; | 244 | QStringList exts = (*extFor)[id]; |
245 | QStringList newexts; | 245 | QStringList newexts; |
246 | if ( it != tokens.end() ) { | 246 | while ( it != tokens.end() ) { |
247 | exts.remove(*it); | 247 | exts.remove(*it); |
248 | if ( !newexts.contains(*it) ) | 248 | if ( !newexts.contains(*it) ) |
249 | newexts.append(*it); | 249 | newexts.append(*it); |
250 | while (it != tokens.end()) { | 250 | (*typeFor)[*it] = id; |
251 | (*typeFor)[*it] = id; | 251 | ++it; |
252 | ++it; | ||
253 | } | ||
254 | } | 252 | } |
255 | (*extFor)[id] = newexts + exts; | 253 | (*extFor)[id] = newexts + exts; |
256 | } | 254 | } |