mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-28 10:32:22 -04:00
only allocate a remote directory entry if the peer is online, or the file already exists
This commit is contained in:
parent
8c8cc88503
commit
99860c1eb0
1 changed files with 4 additions and 2 deletions
|
@ -476,8 +476,10 @@ void p3FileDatabase::cleanup()
|
||||||
//
|
//
|
||||||
for(std::set<RsPeerId>::const_iterator it(friend_set.begin());it!=friend_set.end();++it)
|
for(std::set<RsPeerId>::const_iterator it(friend_set.begin());it!=friend_set.end();++it)
|
||||||
{
|
{
|
||||||
// Check if a remote directory exists for that friend, possibly creating the index.
|
// Check if a remote directory exists for that friend, possibly creating the index if the file does not but the friend is online.
|
||||||
locked_getFriendIndex(*it) ;
|
|
||||||
|
if(rsPeers->isOnline(*it) || RsDirUtil::fileExists(makeRemoteFileName(*it)))
|
||||||
|
locked_getFriendIndex(*it) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// cancel existing requests for which the peer is offline
|
// cancel existing requests for which the peer is offline
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue