diff --git a/libretroshare/src/file_sharing/p3filelists.cc b/libretroshare/src/file_sharing/p3filelists.cc index 2e8921af2..71a87d6fd 100644 --- a/libretroshare/src/file_sharing/p3filelists.cc +++ b/libretroshare/src/file_sharing/p3filelists.cc @@ -476,8 +476,10 @@ void p3FileDatabase::cleanup() // for(std::set::const_iterator it(friend_set.begin());it!=friend_set.end();++it) { - // Check if a remote directory exists for that friend, possibly creating the index. - locked_getFriendIndex(*it) ; + // Check if a remote directory exists for that friend, possibly creating the index if the file does not but the friend is online. + + if(rsPeers->isOnline(*it) || RsDirUtil::fileExists(makeRemoteFileName(*it))) + locked_getFriendIndex(*it) ; } // cancel existing requests for which the peer is offline