From: Jeremy Allison Date: Wed, 7 Oct 2009 22:14:50 +0000 (-0700) Subject: Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with recent... X-Git-Tag: talloc-2.0.1~66 X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=746fb5aa4fb562f7626cd39197f8ef087dbf20a7 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. --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 146d8097387..bf216050b8c 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -430,14 +430,12 @@ bool file_find_subpath(files_struct *dir_fsp) 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 (d1_len == dlen) { + if (d1_fullname[dlen] != '/') { TALLOC_FREE(d1_fullname); continue; }