The Samba-Bugzilla – Attachment 14231 Details for
Bug 13445
Fuzzy searching in link-dest tries to open regular file as directory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch using FLAG_PERHAPS_DIR
13445_file_as_dir_with_flag.patch (text/plain), 1.97 KB, created by
Ben RUBSON
on 2018-06-09 15:24:48 UTC
(
hide
)
Description:
Patch using FLAG_PERHAPS_DIR
Filename:
MIME Type:
Creator:
Ben RUBSON
Created:
2018-06-09 15:24:48 UTC
Size:
1.97 KB
patch
obsolete
>--- rsync.h.orig 2018-01-15 19:58:31.000000000 +0100 >+++ rsync.h 2018-06-09 16:44:53.000000000 +0200 >@@ -83,6 +83,7 @@ > #define FLAG_SKIP_GROUP (1<<10) /* receiver/generator */ > #define FLAG_TIME_FAILED (1<<11)/* generator */ > #define FLAG_MOD_NSEC (1<<12) /* sender/receiver/generator */ >+#define FLAG_PERHAPS_DIR (1<<13)/* generator */ > > /* These flags are passed to functions but not stored. */ > >--- generator.c.orig 2018-01-15 19:58:31.000000000 +0100 >+++ generator.c 2018-06-09 17:02:12.000000000 +0200 >@@ -1309,7 +1309,7 @@ > for (i = 0; i < fuzzy_basis; i++) { > if (i && pathjoin(fnamecmpbuf, MAXPATHLEN, basis_dir[i-1], dn) >= MAXPATHLEN) > continue; >- fuzzy_dirlist[i] = get_dirlist(fnamecmpbuf, -1, GDL_IGNORE_FILTER_RULES); >+ fuzzy_dirlist[i] = get_dirlist(fnamecmpbuf, -1, GDL_IGNORE_FILTER_RULES | FLAG_PERHAPS_DIR); > if (fuzzy_dirlist[i] && fuzzy_dirlist[i]->used == 0) { > flist_free(fuzzy_dirlist[i]); > fuzzy_dirlist[i] = NULL; >--- flist.c.orig 2018-01-15 04:55:07.000000000 +0100 >+++ flist.c 2018-06-09 17:01:47.000000000 +0200 >@@ -1703,6 +1703,8 @@ > interpret_stat_error(fbuf, True); > return; > } >+ if ((errno == ENOTDIR) && (flags & FLAG_PERHAPS_DIR)) >+ return; > io_error |= IOERR_GENERAL; > rsyserr(FERROR_XFER, errno, "opendir %s failed", full_fname(fbuf)); > return; >@@ -3228,6 +3230,7 @@ > int save_xfer_dirs = xfer_dirs; > int save_prune_empty_dirs = prune_empty_dirs; > int senddir_fd = flags & GDL_IGNORE_FILTER_RULES ? -2 : -1; >+ int senddir_flags = FLAG_CONTENT_DIR; > > if (dlen < 0) { > dlen = strlcpy(dirbuf, dirname, MAXPATHLEN); >@@ -3238,9 +3241,13 @@ > > dirlist = flist_new(FLIST_TEMP, "get_dirlist"); > >+ if (flags & FLAG_PERHAPS_DIR) { >+ senddir_flags |= FLAG_PERHAPS_DIR; >+ } >+ > recurse = 0; > xfer_dirs = 1; >- send_directory(senddir_fd, dirlist, dirname, dlen, FLAG_CONTENT_DIR); >+ send_directory(senddir_fd, dirlist, dirname, dlen, senddir_flags); > xfer_dirs = save_xfer_dirs; > recurse = save_recurse; > if (INFO_GTE(PROGRESS, 1))
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
Actions:
View
Attachments on
bug 13445
:
14205
| 14231