added optional delay to check files after download in order to prevent skiping recently downloaded files

This commit is contained in:
csoler 2020-01-29 22:04:29 +01:00
parent 0efc6b00a1
commit 10bee9f26b
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
9 changed files with 18 additions and 14 deletions

View file

@ -821,7 +821,7 @@ bool ftController::completeFile(const RsFileHash& hash)
RsServer::notify()->notifyDownloadComplete(hash.toStdString());
RsServer::notify()->notifyDownloadCompleteCount(completeCount);
rsFiles->ForceDirectoryCheck() ;
rsFiles->ForceDirectoryCheck(true) ;
IndicateConfigChanged(); /* completed transfer -> save */
return true;

View file

@ -791,9 +791,9 @@ void ftServer::updateSinceGroupPermissionsChanged()
{
mFileDatabase->forceSyncWithPeers();
}
void ftServer::ForceDirectoryCheck()
void ftServer::ForceDirectoryCheck(bool add_safe_delay)
{
mFileDatabase->forceDirectoryCheck();
mFileDatabase->forceDirectoryCheck(add_safe_delay);
return;
}

View file

@ -275,7 +275,7 @@ public:
* Utility Functions
***/
virtual bool ConvertSharedFilePath(std::string path, std::string &fullpath);
virtual void ForceDirectoryCheck();
virtual void ForceDirectoryCheck(bool add_safe_delay);
virtual void updateSinceGroupPermissionsChanged() ;
virtual bool InDirectoryCheck();
virtual bool copyFile(const std::string& source, const std::string& dest);