mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed fill of the shared files when removing a directory from share.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6999 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dacec52e4f
commit
8ef40bd944
@ -906,7 +906,6 @@ void FileIndexMonitor::updateCycle()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cleanedCount > 0) {
|
if (cleanedCount > 0) {
|
||||||
// cb->notifyListPreChange(NOTIFY_LIST_DIRLIST_LOCAL, 0);
|
|
||||||
RsServer::notify()->notifyListChange(NOTIFY_LIST_DIRLIST_LOCAL, 0);
|
RsServer::notify()->notifyListChange(NOTIFY_LIST_DIRLIST_LOCAL, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1437,6 +1436,9 @@ bool FileIndexMonitor::inDirectoryCheck()
|
|||||||
bool FileIndexMonitor::internal_setSharedDirectories()
|
bool FileIndexMonitor::internal_setSharedDirectories()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
{
|
||||||
RsStackMutex stack(fiMutex) ; /* LOCKED DIRS */
|
RsStackMutex stack(fiMutex) ; /* LOCKED DIRS */
|
||||||
|
|
||||||
if (!pendingDirs)
|
if (!pendingDirs)
|
||||||
@ -1503,9 +1505,18 @@ bool FileIndexMonitor::internal_setSharedDirectories()
|
|||||||
topdirs.push_back(cit->first);
|
topdirs.push_back(cit->first);
|
||||||
}
|
}
|
||||||
|
|
||||||
fi.setRootDirectories(topdirs, 0);
|
if (fi.setRootDirectories(topdirs, 0) > 0)
|
||||||
|
{
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
locked_saveFileIndexes(true) ;
|
locked_saveFileIndexes(true) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changed)
|
||||||
|
{
|
||||||
|
RsServer::notify()->notifyListChange(NOTIFY_LIST_DIRLIST_LOCAL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -557,7 +557,7 @@ int FileIndex::setRootDirectories(const std::list<std::string> &inlist, time_t u
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* remove all dirs with zero time (non recursive) */
|
/* remove all dirs with zero time (non recursive) */
|
||||||
root->removeOldEntries(utime, false);
|
int cleanedCount = root->removeOldEntries(utime, false);
|
||||||
|
|
||||||
/* now flag remaining directories with correct update time */
|
/* now flag remaining directories with correct update time */
|
||||||
for(it = root->subdirs.begin(); it != root->subdirs.end(); it++)
|
for(it = root->subdirs.begin(); it != root->subdirs.end(); it++)
|
||||||
@ -569,7 +569,7 @@ int FileIndex::setRootDirectories(const std::list<std::string> &inlist, time_t u
|
|||||||
|
|
||||||
updateHashIndex() ;
|
updateHashIndex() ;
|
||||||
|
|
||||||
return 1;
|
return cleanedCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileIndex::updateHashIndex()
|
void FileIndex::updateHashIndex()
|
||||||
|
Loading…
Reference in New Issue
Block a user