diff --git a/libretroshare/src/file_sharing/p3filelists.cc b/libretroshare/src/file_sharing/p3filelists.cc index 34a16b4ba..c3f2fc24b 100644 --- a/libretroshare/src/file_sharing/p3filelists.cc +++ b/libretroshare/src/file_sharing/p3filelists.cc @@ -399,7 +399,16 @@ bool p3FileDatabase::loadList(std::list& load) std::list dirList; std::list 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::iterator it = load.begin(); it != load.end(); ++it) { @@ -439,6 +448,8 @@ bool p3FileDatabase::loadList(std::list& load) } else if(kit->key == IGNORED_PREFIXES_SS) { + ignored_prefixes.clear(); + std::string b ; for(uint32_t i=0;ivalue.size();++i) if(kit->value[i] == ';') @@ -451,6 +462,8 @@ bool p3FileDatabase::loadList(std::list& load) } else if(kit->key == IGNORED_SUFFIXES_SS) { + ignored_suffixes.clear(); + std::string b ; for(uint32_t i=0;ivalue.size();++i) if(kit->value[i] == ';') diff --git a/retroshare-gui/src/gui/settings/TransferPage.cpp b/retroshare-gui/src/gui/settings/TransferPage.cpp index 33ba576f8..ee3df7044 100644 --- a/retroshare-gui/src/gui/settings/TransferPage.cpp +++ b/retroshare-gui/src/gui/settings/TransferPage.cpp @@ -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)