mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
added default ignore list on linux
This commit is contained in:
parent
0ca0b72a5a
commit
551ef63c6e
@ -399,7 +399,16 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
||||
|
||||
std::list<SharedDirInfo> dirList;
|
||||
std::list<std::string> ignored_prefixes,ignored_suffixes ;
|
||||
uint32_t ignore_flags ;
|
||||
uint32_t ignore_flags = RS_FILE_SHARE_FLAGS_IGNORE_PREFIXES | RS_FILE_SHARE_FLAGS_IGNORE_SUFFIXES ;
|
||||
|
||||
// OS-dependent default ignore lists
|
||||
#ifdef WINDOWS_SYS
|
||||
ignored_suffixes.push_back( ".bak" );
|
||||
#else
|
||||
ignored_prefixes.push_back( "." );
|
||||
ignored_suffixes.push_back( "~" );
|
||||
ignored_suffixes.push_back( ".part" );
|
||||
#endif
|
||||
|
||||
for(std::list<RsItem *>::iterator it = load.begin(); it != load.end(); ++it)
|
||||
{
|
||||
@ -439,6 +448,8 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
||||
}
|
||||
else if(kit->key == IGNORED_PREFIXES_SS)
|
||||
{
|
||||
ignored_prefixes.clear();
|
||||
|
||||
std::string b ;
|
||||
for(uint32_t i=0;i<kit->value.size();++i)
|
||||
if(kit->value[i] == ';')
|
||||
@ -451,6 +462,8 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
||||
}
|
||||
else if(kit->key == IGNORED_SUFFIXES_SS)
|
||||
{
|
||||
ignored_suffixes.clear();
|
||||
|
||||
std::string b ;
|
||||
for(uint32_t i=0;i<kit->value.size();++i)
|
||||
if(kit->value[i] == ';')
|
||||
|
@ -73,11 +73,13 @@ void TransferPage::updateIgnoreLists()
|
||||
|
||||
rsFiles->setIgnoreLists(lp,ls,flags) ;
|
||||
|
||||
#ifdef DEBUG_TRANSFERS_PAGE
|
||||
std::cerr << "Setting ignore lists: " << std::endl;
|
||||
|
||||
std::cerr << " flags: " << flags << std::endl;
|
||||
std::cerr << " prefixes: " ; for(auto it(lp.begin());it!=lp.end();++it) std::cerr << "\"" << *it << "\" " ; std::cerr << std::endl;
|
||||
std::cerr << " suffixes: " ; for(auto it(ls.begin());it!=ls.end();++it) std::cerr << "\"" << *it << "\" " ; std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void TransferPage::updateMaxTRUpRate(int b)
|
||||
|
Loading…
Reference in New Issue
Block a user