]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with recent...
authorJeremy Allison <jra@samba.org>
Wed, 7 Oct 2009 22:49:56 +0000 (15:49 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 9 Oct 2009 06:41:30 +0000 (08:41 +0200)
source/smbd/files.c

index cdaa5f11db594eafac3b9ad79cd8777983ebd744..e74ad7afe48162c3ca1683bba4618acb7b4c729b 100644 (file)
@@ -407,13 +407,18 @@ bool file_find_subpath(files_struct *dir_fsp)
                                        fsp->conn->connectpath,
                                        fsp->fsp_name);
 
-               if (strnequal(d_fullname, d1_fullname, dlen)) {
+               /*
+                * 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(d_fullname);
                        TALLOC_FREE(d1_fullname);
                        return true;
                }
                TALLOC_FREE(d1_fullname);
-       } 
+       }
 
        TALLOC_FREE(d_fullname);
        return false;