mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed initialisation of random salt in directory updater when no config file is present
This commit is contained in:
parent
eedeaebbe7
commit
cf8dac2e74
@ -99,6 +99,7 @@ void p3FileDatabase::setSharedDirectories(const std::list<SharedDirInfo>& shared
|
||||
|
||||
mLocalSharedDirs->setSharedDirectoryList(shared_dirs) ;
|
||||
mLocalDirWatcher->forceUpdate();
|
||||
|
||||
}
|
||||
|
||||
IndicateConfigChanged();
|
||||
@ -423,14 +424,6 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
||||
|
||||
delete *it ;
|
||||
}
|
||||
if(mLocalDirWatcher->hashSalt().isNull())
|
||||
{
|
||||
std::cerr << "(WW) Initialising directory watcher salt to some random value " << std::endl;
|
||||
mLocalDirWatcher->setHashSalt(RsFileHash::random()) ;
|
||||
|
||||
IndicateConfigChanged();
|
||||
}
|
||||
|
||||
|
||||
/* set directories */
|
||||
mLocalSharedDirs->setSharedDirectoryList(dirList);
|
||||
@ -547,6 +540,16 @@ void p3FileDatabase::cleanup()
|
||||
#endif
|
||||
++it ;
|
||||
}
|
||||
|
||||
// This is needed at least here, because loadList() might never have been called, if there is no config file present.
|
||||
|
||||
if(mLocalDirWatcher->hashSalt().isNull())
|
||||
{
|
||||
std::cerr << "(WW) Initialising directory watcher salt to some random value " << std::endl;
|
||||
mLocalDirWatcher->setHashSalt(RsFileHash::random()) ;
|
||||
|
||||
IndicateConfigChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user