- // modify the existing entry: the entry in one and the same file
- // are read in top-to-bottom order, i.e. the entries read first
- // should be tried before the entries below. However, the files
- // read later should override the settings in the files read
- // before, thus we Append() the new entry to the list if it has
- // already occured in _this_ file, but Prepend() it if it
- // occured in some of the previous ones.
- if ( aEntryIndices.Index(nIndex) == NOT_FOUND ) {
- // first time in this file
- aEntryIndices.Add(nIndex);
- entry->Prepend(m_aEntries[nIndex]);
- m_aEntries[nIndex] = entry;
+ // modify the existing entry: the entries in one and the same
+ // file are read in top-to-bottom order, i.e. the entries read
+ // first should be tried before the entries below. However,
+ // the files read later should override the settings in the
+ // files read before (except if fallback is TRUE), thus we
+ // Insert() the new entry to the list if it has already
+ // occured in _this_ file, but Prepend() it if it occured in
+ // some of the previous ones and Append() to it in the
+ // fallback case
+
+ if ( fallback ) {
+ // 'fallback' parameter prevents the entries from this
+ // file from overriding the other ones - always append
+ MailCapEntry *entryOld = m_aEntries[nIndex];
+ if ( entryOld )
+ entry->Append(entryOld);
+ else
+ m_aEntries[nIndex] = entry;