mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-13 01:39:29 -04:00
fixed bug causing suffix/prefix lists to contain an empty string
This commit is contained in:
parent
bc05aaa9d9
commit
22942dc70b
2 changed files with 5 additions and 3 deletions
|
@ -478,7 +478,9 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
||||||
for(uint32_t i=0;i<kit->value.size();++i)
|
for(uint32_t i=0;i<kit->value.size();++i)
|
||||||
if(kit->value[i] == ';')
|
if(kit->value[i] == ';')
|
||||||
{
|
{
|
||||||
ignored_prefixes.push_back(b) ;
|
if(!b.empty()) // security!
|
||||||
|
ignored_prefixes.push_back(b) ;
|
||||||
|
|
||||||
b.clear();
|
b.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -70,8 +70,8 @@ void TransferPage::updateIgnoreLists()
|
||||||
if(ui.suffixesIgnoreList_CB->isChecked()) flags |= RS_FILE_SHARE_FLAGS_IGNORE_SUFFIXES ;
|
if(ui.suffixesIgnoreList_CB->isChecked()) flags |= RS_FILE_SHARE_FLAGS_IGNORE_SUFFIXES ;
|
||||||
|
|
||||||
std::list<std::string> lp,ls ;
|
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.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) ls.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) ;
|
rsFiles->setIgnoreLists(lp,ls,flags) ;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue