Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31f3b68
)
Complain if the --suffix value contains slashes (which is all too easy
author
Wayne Davison
<wayned@samba.org>
Fri, 1 Aug 2003 19:40:31 +0000
(19:40 +0000)
committer
Wayne Davison
<wayned@samba.org>
Fri, 1 Aug 2003 19:40:31 +0000
(19:40 +0000)
to accidentally have happen if you try to specify "~" with --backup-dir).
options.c
patch
|
blob
|
blame
|
history
diff --git
a/options.c
b/options.c
index
945dddd
..
a4111ca
100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-633,6
+633,11
@@
int parse_arguments(int *argc, const char ***argv, int frommain)
if (!backup_suffix)
backup_suffix = backup_dir? "" : BACKUP_SUFFIX;
backup_suffix_len = strlen(backup_suffix);
+ if (strchr(backup_suffix, '/') != NULL) {
+ rprintf(FERROR, "--suffix cannot contain slashes: %s\n",
+ backup_suffix);
+ exit_cleanup(RERR_SYNTAX);
+ }
if (backup_dir)
backup_dir_len = strlen(backup_dir);
else if (!backup_suffix_len) {