Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with recent...
[ira/wip.git] / source3 / smbd / files.c
index 146d80973874101742dd6c25f373fdd36a479fd0..bf216050b8c4d62aa9e9d431ebf6b30550454347 100644 (file)
@@ -430,14 +430,12 @@ bool file_find_subpath(files_struct *dir_fsp)
                                        fsp->fsp_name->base_name);
 
                if (strnequal(d_fullname, d1_fullname, dlen)) {
                                        fsp->fsp_name->base_name);
 
                if (strnequal(d_fullname, d1_fullname, dlen)) {
-                       int d1_len = strlen(d1_fullname);
-
                        /*
                         * 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 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_len == dlen) {
+                       if (d1_fullname[dlen] != '/') {
                                TALLOC_FREE(d1_fullname);
                                continue;
                        }
                                TALLOC_FREE(d1_fullname);
                                continue;
                        }