added default ignore list on linux

This commit is contained in:
csoler 2017-09-11 19:36:06 +02:00
parent 0ca0b72a5a
commit 551ef63c6e
2 changed files with 16 additions and 1 deletions

View File

@ -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] == ';')

View File

@ -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)