mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-02 12:06:12 -04:00
Fix module-name splitting with --protect-args.
Fixes bug 8838.
This commit is contained in:
1
t_stub.c
1
t_stub.c
@@ -23,6 +23,7 @@
|
||||
|
||||
int modify_window = 0;
|
||||
int preallocate_files = 0;
|
||||
int protect_args = 0;
|
||||
int module_id = -1;
|
||||
int relative_paths = 0;
|
||||
int module_dirlen = 0;
|
||||
|
||||
6
util.c
6
util.c
@@ -26,6 +26,7 @@
|
||||
#include "inums.h"
|
||||
|
||||
extern int module_id;
|
||||
extern int protect_args;
|
||||
extern int modify_window;
|
||||
extern int relative_paths;
|
||||
extern int preserve_times;
|
||||
@@ -759,6 +760,11 @@ void glob_expand_module(char *base1, char *arg, char ***argv_p, int *argc_p, int
|
||||
if (strncmp(arg, base, base_len) == 0)
|
||||
arg += base_len;
|
||||
|
||||
if (protect_args) {
|
||||
glob_expand(arg, argv_p, argc_p, maxargs_p);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(arg = strdup(arg)))
|
||||
out_of_memory("glob_expand_module");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user