mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-22 07:41:20 -04:00
added optional delay to check files after download in order to prevent skiping recently downloaded files
This commit is contained in:
parent
0efc6b00a1
commit
10bee9f26b
9 changed files with 18 additions and 14 deletions
|
@ -107,10 +107,13 @@ void LocalDirectoryUpdater::threadTick()
|
|||
}
|
||||
}
|
||||
|
||||
void LocalDirectoryUpdater::forceUpdate()
|
||||
void LocalDirectoryUpdater::forceUpdate(bool add_safe_delay)
|
||||
{
|
||||
mForceUpdate = true ;
|
||||
mLastSweepTime = 0 ;
|
||||
mLastSweepTime = rstime_t(time(NULL)) - rstime_t(mDelayBetweenDirectoryUpdates) ;
|
||||
|
||||
if(add_safe_delay)
|
||||
mLastSweepTime += rstime_t(MIN_TIME_AFTER_LAST_MODIFICATION);
|
||||
|
||||
if(mHashCache != NULL && mHashCache->hashingProcessPaused())
|
||||
mHashCache->togglePauseHashingProcess();
|
||||
|
@ -363,7 +366,7 @@ void LocalDirectoryUpdater::setFollowSymLinks(bool b)
|
|||
|
||||
mFollowSymLinks = b ;
|
||||
|
||||
forceUpdate();
|
||||
forceUpdate(false);
|
||||
}
|
||||
|
||||
bool LocalDirectoryUpdater::followSymLinks() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue