mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Made the hash-cache more compliant with mounted/network drives:
- corrected bug that would wipe out the cache file every other start - missing root directories are not discarded anymore, but kept empty, unless the user really removes them git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4271 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2a82826fba
commit
f290c8eca4
5 changed files with 43 additions and 32 deletions
|
@ -119,8 +119,8 @@ bool ftFiStore::search(const std::string &hash, uint32_t hintflags, FileInfo &in
|
|||
}
|
||||
|
||||
|
||||
ftFiMonitor::ftFiMonitor(CacheStrapper *cs,NotifyBase *cb_in, std::string cachedir, std::string pid)
|
||||
:FileIndexMonitor(cs,cb_in, cachedir, pid), p3Config(CONFIG_TYPE_FT_SHARED)
|
||||
ftFiMonitor::ftFiMonitor(CacheStrapper *cs,NotifyBase *cb_in, std::string cachedir, std::string pid,const std::string& config_dir)
|
||||
:FileIndexMonitor(cs,cb_in, cachedir, pid,config_dir), p3Config(CONFIG_TYPE_FT_SHARED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ virtual bool search(const std::string &hash, uint32_t hintflags, FileInfo &info)
|
|||
class ftFiMonitor: public FileIndexMonitor, public ftSearch, public p3Config
|
||||
{
|
||||
public:
|
||||
ftFiMonitor(CacheStrapper *cs,NotifyBase *cb_in, std::string cachedir, std::string pid);
|
||||
ftFiMonitor(CacheStrapper *cs,NotifyBase *cb_in, std::string cachedir, std::string pid,const std::string& config_dir);
|
||||
|
||||
/* overloaded search function */
|
||||
virtual bool search(const std::string &hash, uint32_t hintflags, FileInfo &info) const;
|
||||
|
|
|
@ -132,7 +132,7 @@ void ftServer::SetupFtServer(NotifyBase *cb)
|
|||
|
||||
/* Make Cache Source/Store */
|
||||
mFiStore = new ftFiStore(mCacheStrapper, mFtController, cb,mConnMgr, ownId, remotecachedir);
|
||||
mFiMon = new ftFiMonitor(mCacheStrapper,cb, localcachedir, ownId);
|
||||
mFiMon = new ftFiMonitor(mCacheStrapper,cb, localcachedir, ownId,mConfigPath);
|
||||
|
||||
/* now add the set to the cachestrapper */
|
||||
CachePair cp(mFiMon, mFiStore, CacheId(RS_SERVICE_TYPE_FILE_INDEX, 0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue