[PATCH] Re: fruit_rename() prepend ._ again if fruit:ressource=file
slow at samba.org
Tue Jun 27 08:17:01 UTC 2017
On Tue, Jun 27, 2017 at 03:02:14PM +0800, Jones Syue via samba-technical wrote:
> Test master (4.7.0pre1-GIT-bcfa12c) also has this symptom,
> refer to attach gdb log,
> 1st rename() and 2nd rename() are came from fruit_rename(),
> which call SMB_VFS_NEXT_RENAME() twice.
> Attached patch could address this issue,
> this patch checks if the source appledouble basname matched
> the destination basename; if they are matched,
> would goto done and avoid 2nd rename().
> Please help review and any suggestions are appreciated,
> thank you.
> For example,
> a text file called "newfile.txt",
> and win8.1 windows explorer renamed it to "._newfile.txt".
> In fruit_rename(),
> 1. The 1st SMB_VFS_NEXT_RENAME() do rename:
> ./newfile.txt -> ./_.newfile.txt
> 2. Then this patch check and found that the source appbledouble
> basename (._newfile.txt) matched the destination basename
> (._newfile.txt), would goto done.
> Hence the 2nd SMB_VFS_NEXT_RENAME() is not called.
let me ask one question: why would you want to do such a rename from a Windows
At the very best, the resulting renamed ._ file will trigger error messages from
vfs_fruit when trying to parse it as an AppleDouble file.
More information about the samba-technical