added an option to follow symbolic links or not, and anti-loop system during directories traversal

This commit is contained in:
mr-alice 2016-11-24 23:42:56 +01:00
parent cf270d73c0
commit 5f69c9ea1f
13 changed files with 218 additions and 126 deletions

View file

@ -47,6 +47,9 @@ public:
void setFileWatchPeriod(int seconds) ;
uint32_t fileWatchPeriod() const ;
void setFollowSymLinks(bool b) ;
bool followSymLinks() const ;
void setEnabled(bool b) ;
bool isEnabled() const ;
@ -56,7 +59,7 @@ protected:
virtual void hash_callback(uint32_t client_param, const std::string& name, const RsFileHash& hash, uint64_t size);
virtual bool hash_confirm(uint32_t client_param) ;
void recursUpdateSharedDir(const std::string& cumulated_path,DirectoryStorage::EntryIndex indx);
void recursUpdateSharedDir(const std::string& cumulated_path, DirectoryStorage::EntryIndex indx, std::set<std::string>& existing_directories);
void sweepSharedDirectories();
private:
@ -70,5 +73,6 @@ private:
uint32_t mDelayBetweenDirectoryUpdates;
bool mIsEnabled ;
bool mFollowSymLinks;
};