[SCM] Samba Shared Repository - branch v3-5-test updated

Jeremy Allison jra at samba.org
Wed Oct 7 16:41:05 MDT 2009


The branch, v3-5-test has been updated
       via  48fee26... Make the logic a lot clearer and fix the comment to match. Jeremy
      from  fcd6a57... Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with recent versions of Samba. Without this fix, renaming a directory ./a to ./b, whilst a directory ./aa was already open would fail. Jeremy.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -----------------------------------------------------------------
commit 48fee26ab0a7b33fa97032b85bebbb4dc7fb8c68
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 7 15:39:38 2009 -0700

    Make the logic a lot clearer and fix the comment to match.
    Jeremy

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/files.c |   25 ++++++++++---------------
 1 files changed, 10 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index bf21605..f7509d7 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -429,24 +429,19 @@ bool file_find_subpath(files_struct *dir_fsp)
 					fsp->conn->connectpath,
 					fsp->fsp_name->base_name);
 
-		if (strnequal(d_fullname, d1_fullname, dlen)) {
-			/*
-			 * If the open file is a second file handle to the
-			 * same name or is a stream on the original file, then
-			 * don't return true.
-			 */
-			if (d1_fullname[dlen] != '/') {
-				TALLOC_FREE(d1_fullname);
-				continue;
-			}
-
+		/*
+		 * If the open file has a path that is a longer
+		 * component, then it's a subpath.
+		 */
+		if (strnequal(d_fullname, d1_fullname, dlen) &&
+				(d1_fullname[dlen] == '/')) {
 			TALLOC_FREE(d1_fullname);
-			ret = true;
-			goto out;
+			TALLOC_FREE(d_fullname);
+			return true;
 		}
 		TALLOC_FREE(d1_fullname);
-	} 
- out:
+	}
+
 	TALLOC_FREE(d_fullname);
 	return ret;
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list