mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
fixed bug causing suffix/prefix lists to contain an empty string
This commit is contained in:
parent
bc05aaa9d9
commit
22942dc70b
@ -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
|
||||
|
@ -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) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user