← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2120: Fix broken share regression on non-Windows systems

 

------------------------------------------------------------
revno: 2120
fixes bug(s): https://launchpad.net/bugs/548743
committer: Steven Sheehy <steven.sheehy@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-03-29 20:32:40 -0500
message:
  Fix broken share regression on non-Windows systems
modified:
  changelog.txt
  dcpp/File.h


--
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-03-28 21:41:51 +0000
+++ changelog.txt	2010-03-30 01:32:40 +0000
@@ -7,6 +7,7 @@
 * Smooth text-box menus (poy)
 * Add user commands to the chat menu (poy)
 * OpenSSL 0.9.8n - defends against a remote crash (poy)
+* [L#548743] Fix broken share regression on non-Windows systems (steven sheehy)
 
 -- 0.761 2010-03-14 --
 * [L#533840] Fix crashes with themed menus (poy)

=== modified file 'dcpp/File.h'
--- dcpp/File.h	2010-03-17 17:51:48 +0000
+++ dcpp/File.h	2010-03-30 01:32:40 +0000
@@ -174,7 +174,6 @@
 private:
 	HANDLE handle;
 #else
-	// This code has been cleaned up/fixed a little.
 public:
 	FileFindIter() {
 		dir = NULL;
@@ -228,7 +227,9 @@
 		}
 		bool isHidden() {
 			if (!ent) return false;
-			return ent->d_name[0] == '.';
+			// Check if the parent directory is hidden for '.'
+			if (strcmp(ent->d_name, ".") == 0 && base[0] == '.') return true;
+			return ent->d_name[0] == '.' && strlen(ent->d_name) > 1;
 		}
 		bool isLink() {
 			struct stat inode;