fixed bug causing suffix/prefix lists to contain an empty string

This commit is contained in:
csoler 2017-10-01 20:20:26 +02:00
parent bc05aaa9d9
commit 22942dc70b
2 changed files with 5 additions and 3 deletions

View File

@ -478,7 +478,9 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
for(uint32_t i=0;i<kit->value.size();++i)
if(kit->value[i] == ';')
{
if(!b.empty()) // security!
ignored_prefixes.push_back(b) ;
b.clear();
}
else

View File

@ -70,8 +70,8 @@ void TransferPage::updateIgnoreLists()
if(ui.suffixesIgnoreList_CB->isChecked()) flags |= RS_FILE_SHARE_FLAGS_IGNORE_SUFFIXES ;
std::list<std::string> lp,ls ;
{ QStringList L = ui.prefixesIgnoreList_LE->text().split(';') ; for(QStringList::const_iterator it(L.begin());it!=L.end();++it) lp.push_back((*it).toStdString()) ; }
{ QStringList L = ui.suffixesIgnoreList_LE->text().split(';') ; for(QStringList::const_iterator it(L.begin());it!=L.end();++it) ls.push_back((*it).toStdString()) ; }
{ QStringList L = ui.prefixesIgnoreList_LE->text().split(';') ; for(QStringList::const_iterator it(L.begin());it!=L.end();++it) if(!(*it).isNull()) lp.push_back((*it).toStdString()) ; }
{ QStringList L = ui.suffixesIgnoreList_LE->text().split(';') ; for(QStringList::const_iterator it(L.begin());it!=L.end();++it) if(!(*it).isNull()) ls.push_back((*it).toStdString()) ; }
rsFiles->setIgnoreLists(lp,ls,flags) ;