Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mention new SSH_* vars.
[rsync/rsync.git]
/
options.c
diff --git
a/options.c
b/options.c
index
153049e
..
69eac5c
100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-83,6
+83,7
@@
int safe_symlinks = 0;
int copy_unsafe_links = 0;
int size_only = 0;
int bwlimit = 0;
int copy_unsafe_links = 0;
int size_only = 0;
int bwlimit = 0;
+size_t bwlimit_writemax = 0;
int delete_after = 0;
int only_existing = 0;
int opt_ignore_existing = 0;
int delete_after = 0;
int only_existing = 0;
int opt_ignore_existing = 0;
@@
-514,26
+515,30
@@
int parse_arguments(int *argc, const char ***argv, int frommain)
break;
case OPT_EXCLUDE:
break;
case OPT_EXCLUDE:
+ if (am_server || sanitize_paths)
+ return 0; /* Impossible... */
add_exclude(&exclude_list, poptGetOptArg(pc), 0);
break;
case OPT_INCLUDE:
add_exclude(&exclude_list, poptGetOptArg(pc), 0);
break;
case OPT_INCLUDE:
+ if (am_server || sanitize_paths)
+ return 0; /* Impossible... */
add_exclude(&exclude_list, poptGetOptArg(pc),
XFLG_DEF_INCLUDE);
break;
case OPT_EXCLUDE_FROM:
add_exclude(&exclude_list, poptGetOptArg(pc),
XFLG_DEF_INCLUDE);
break;
case OPT_EXCLUDE_FROM:
+ if (am_server || sanitize_paths)
+ return 0; /* Impossible... */
arg = poptGetOptArg(pc);
arg = poptGetOptArg(pc);
- if (sanitize_paths)
- arg = alloc_sanitize_path(arg, curr_dir);
add_exclude_file(&exclude_list, arg,
XFLG_FATAL_ERRORS);
break;
case OPT_INCLUDE_FROM:
add_exclude_file(&exclude_list, arg,
XFLG_FATAL_ERRORS);
break;
case OPT_INCLUDE_FROM:
+ if (am_server || sanitize_paths)
+ return 0; /* Impossible... */
arg = poptGetOptArg(pc);
arg = poptGetOptArg(pc);
- if (sanitize_paths)
- arg = alloc_sanitize_path(arg, curr_dir);
add_exclude_file(&exclude_list, arg,
XFLG_FATAL_ERRORS | XFLG_DEF_INCLUDE);
break;
add_exclude_file(&exclude_list, arg,
XFLG_FATAL_ERRORS | XFLG_DEF_INCLUDE);
break;
@@
-724,6
+729,12
@@
int parse_arguments(int *argc, const char ***argv, int frommain)
if (do_progress && !verbose)
verbose = 1;
if (do_progress && !verbose)
verbose = 1;
+ if (bwlimit) {
+ bwlimit_writemax = (size_t)bwlimit * 128;
+ if (bwlimit_writemax < 512)
+ bwlimit_writemax = 512;
+ }
+
if (files_from) {
char *colon;
if (*argc != 2 && !(am_server && am_sender && *argc == 1)) {
if (files_from) {
char *colon;
if (*argc != 2 && !(am_server && am_sender && *argc == 1)) {
@@
-914,7
+925,7
@@
void server_options(char **args,int *argc)
}
if (checksum_seed) {
}
if (checksum_seed) {
- if (asprintf(&arg, "--checksum
_
seed=%d", checksum_seed) < 0)
+ if (asprintf(&arg, "--checksum
-
seed=%d", checksum_seed) < 0)
goto oom;
args[ac++] = arg;
}
goto oom;
args[ac++] = arg;
}