mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-14 17:39:37 -04:00
added an additional hard limit to directory depth, just in case
This commit is contained in:
parent
f497905497
commit
4766a8927a
2 changed files with 10 additions and 3 deletions
|
@ -211,7 +211,7 @@ void LocalDirectoryUpdater::recursUpdateSharedDir(const std::string& cumulated_p
|
||||||
|
|
||||||
case librs::util::FolderIterator::TYPE_DIR:
|
case librs::util::FolderIterator::TYPE_DIR:
|
||||||
|
|
||||||
if(mMaxShareDepth > 0u && current_depth <= mMaxShareDepth)
|
if( (mMaxShareDepth > 0u && current_depth <= mMaxShareDepth) || (mMaxShareDepth==0 && current_depth < 64)) // 64 is here as a safe limit, to make loops impossible.
|
||||||
subdirs.insert(dirIt.file_name());
|
subdirs.insert(dirIt.file_name());
|
||||||
|
|
||||||
#ifdef DEBUG_LOCAL_DIR_UPDATER
|
#ifdef DEBUG_LOCAL_DIR_UPDATER
|
||||||
|
|
|
@ -94,6 +94,9 @@
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="ignoreDuplicates_CB">
|
<widget class="QCheckBox" name="ignoreDuplicates_CB">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>When following sybolic links, Retroshare can encounter the same directory/file more than once. If checked, this option will make tell Retroshare to silently ignore the file. This option saves Retroshare indexing against directory loops.</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Ignore duplicate files/directories</string>
|
<string>Ignore duplicate files/directories</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -102,7 +105,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Maximum depth:</string>
|
<string>Maximum depth (0=unlimited):</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
@ -110,7 +113,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="maxDepth_SB"/>
|
<widget class="QSpinBox" name="maxDepth_SB">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>This value allows you to limit the depth of the directory hierarchy you are indexing, starting from the base directory. If you allow Retroshare to follow symbolic links and unchecked &quot;Ignore duplicate files/directories&quot;, this option will avoid that Retroshare loops indefinitly while parsing directories.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue