mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed removal of directory when removing a friend
This commit is contained in:
parent
c2761659e9
commit
e185bcdab4
@ -445,9 +445,13 @@ void p3FileDatabase::cleanup()
|
|||||||
|
|
||||||
// now, in order to avoid empty seats, just move the last one here, and update indexes
|
// now, in order to avoid empty seats, just move the last one here, and update indexes
|
||||||
|
|
||||||
|
while(i < mRemoteDirectories.size() && mRemoteDirectories[i] == NULL)
|
||||||
|
{
|
||||||
mRemoteDirectories[i] = mRemoteDirectories.back();
|
mRemoteDirectories[i] = mRemoteDirectories.back();
|
||||||
mRemoteDirectories.pop_back();
|
mRemoteDirectories.pop_back();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(i < mRemoteDirectories.size() && mRemoteDirectories[i] != NULL) // this test is needed in the case we have deleted the last element
|
||||||
mFriendIndexMap[mRemoteDirectories[i]->peerId()] = i;
|
mFriendIndexMap[mRemoteDirectories[i]->peerId()] = i;
|
||||||
|
|
||||||
mUpdateFlags |= P3FILELISTS_UPDATE_FLAG_REMOTE_DIRS_CHANGED ;
|
mUpdateFlags |= P3FILELISTS_UPDATE_FLAG_REMOTE_DIRS_CHANGED ;
|
||||||
|
Loading…
Reference in New Issue
Block a user