← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2138: Fix sharing root folder was impossible in random cases

 

------------------------------------------------------------
revno: 2138
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Mon 2010-05-10 00:34:42 +0200
message:
  Fix sharing root folder was impossible in random cases
modified:
  changelog.txt
  dcpp/ShareManager.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt	2010-05-09 21:51:12 +0000
+++ changelog.txt	2010-05-09 22:34:42 +0000
@@ -18,6 +18,7 @@
 * Help updates (poy, emtee)
 * [L#550300] Fix a possible file corruption (thanks bigmuscle)
 * [L#551184] Fix unnecessary move of downloaded filelists (emtee)
+* [L#556853] Fix sharing a whole drive (root folder) was impossible in random cases (emtee)
 
 -- 0.761 2010-03-14 --
 * [L#533840] Fix crashes with themed menus (poy)

=== modified file 'dcpp/ShareManager.cpp'
--- dcpp/ShareManager.cpp	2010-03-17 17:51:48 +0000
+++ dcpp/ShareManager.cpp	2010-05-09 22:34:42 +0000
@@ -666,7 +666,13 @@
 }
 
 bool ShareManager::checkHidden(const string& aName) const {
-	return (BOOLSETTING(SHARE_HIDDEN) || !FileFindIter(aName.substr(0, aName.size() - 1))->isHidden());
+	FileFindIter ff = FileFindIter(aName.substr(0, aName.size() - 1));
+
+	if (ff != FileFindIter()) {
+		return (BOOLSETTING(SHARE_HIDDEN) || !ff->isHidden());
+	}
+
+	return true;
 }
 
 void ShareManager::updateIndices(Directory& dir) {