mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 23:45:49 -04:00
fixed handling of incoming rscollection files
This commit is contained in:
parent
142a8e2503
commit
eccfc7ba71
5 changed files with 48 additions and 21 deletions
|
@ -385,7 +385,7 @@ bool RsCollection::checkFile(const QString& fileName, bool showError)
|
|||
|
||||
//std::cerr << "n==" << n <<" Checking string " << std::string(current,n+1) << " c = " << std::hex << (int)c << std::dec << std::endl;
|
||||
|
||||
for(uint i=0;i<bad_strings.size();++i)
|
||||
for(uint i=0;i<bad_strings.size();++i)
|
||||
if(std::string(current,bad_strings[i].length()) == bad_strings[i])
|
||||
{
|
||||
showErrorBox(file.fileName(), QApplication::translate("RsCollectionFile", "This file contains the string \"%1\" and is therefore an invalid collection file. \n\nIf you believe it is correct, remove the corresponding line from the file and re-open it with Retroshare.").arg(bad_strings[i].c_str()));
|
||||
|
@ -394,7 +394,7 @@ bool RsCollection::checkFile(const QString& fileName, bool showError)
|
|||
//std::cerr << "Bad string detected" << std::endl;
|
||||
}
|
||||
|
||||
if(file.atEnd())
|
||||
if(file.atEnd())
|
||||
n-- ;
|
||||
else if(n < max_size)
|
||||
++n ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue