The Samba-Bugzilla – Attachment 4808 Details for
Bug 6781
Cannot rename subfolders in Explorer view with recent versions of Samba
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am patch for 3.4.3 with simplified logic.
0001-Correct-fix-for-bug-6781-Cannot-rename-subfolders.patch (text/plain), 1.95 KB, created by
Jeremy Allison
on 2009-10-07 17:49:34 UTC
(
hide
)
Description:
git-am patch for 3.4.3 with simplified logic.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-10-07 17:49:34 UTC
Size:
1.95 KB
patch
obsolete
>From 1c3229b8cb0f74b8fe0155a242dcbb5a2b9cdd23 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Wed, 7 Oct 2009 15:46:57 -0700 >Subject: [PATCH] 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. Simplifies logic of earlier code. > Jeremy. > >--- > source3/smbd/files.c | 32 ++++++++++++-------------------- > 1 files changed, 12 insertions(+), 20 deletions(-) > >diff --git a/source3/smbd/files.c b/source3/smbd/files.c >index 54c4c73..6f82686 100644 >--- a/source3/smbd/files.c >+++ b/source3/smbd/files.c >@@ -385,13 +385,12 @@ bool file_find_subpath(files_struct *dir_fsp) > { > files_struct *fsp; > size_t dlen; >- bool ret = false; > char *d_fullname = talloc_asprintf(talloc_tos(), > "%s/%s", > dir_fsp->conn->connectpath, > dir_fsp->fsp_name); > if (!d_fullname) { >- goto out; >+ return false; > } > > dlen = strlen(d_fullname); >@@ -408,28 +407,21 @@ bool file_find_subpath(files_struct *dir_fsp) > fsp->conn->connectpath, > fsp->fsp_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 || 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; >+ return false; > } > > /**************************************************************************** >-- >1.5.4.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 6781
:
4791
|
4803
|
4804
|
4805
|
4806
|
4807
| 4808 |
4809