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
Minor restructuring/clarification to get_backup_name.
[rsync/rsync.git]
/
backup.c
diff --git
a/backup.c
b/backup.c
index
937f1be
..
6dbc17a
100644
(file)
--- a/
backup.c
+++ b/
backup.c
@@
-160,13
+160,13
@@
char *get_backup_name(const char *fname)
/* copy fname into backup_dir_buf while validating the dirs. */
if (copy_valid_path(fname))
return backup_dir_buf;
/* copy fname into backup_dir_buf while validating the dirs. */
if (copy_valid_path(fname))
return backup_dir_buf;
+ /* copy_valid_path() has printed an error message. */
return NULL;
return NULL;
- } else {
- if (stringjoin(backup_dir_buf, MAXPATHLEN,
- fname, backup_suffix, NULL) < MAXPATHLEN)
- return backup_dir_buf;
}
}
+ if (stringjoin(backup_dir_buf, MAXPATHLEN, fname, backup_suffix, NULL) < MAXPATHLEN)
+ return backup_dir_buf;
+
rprintf(FERROR, "backup filename too long\n");
return NULL;
}
rprintf(FERROR, "backup filename too long\n");
return NULL;
}
@@
-276,8
+276,8
@@
int make_backup(const char *fname, BOOL prefer_rename)
const char *sl = F_SYMLINK(file);
if (safe_symlinks && unsafe_symlink(sl, fname)) {
if (INFO_GTE(SYMSAFE, 1)) {
const char *sl = F_SYMLINK(file);
if (safe_symlinks && unsafe_symlink(sl, fname)) {
if (INFO_GTE(SYMSAFE, 1)) {
- rprintf(FINFO, "
ignoring unsafe symlink %s -> %s
\n",
- f
ull_fname(buf)
, sl);
+ rprintf(FINFO, "
not backing up unsafe symlink \"%s\" -> \"%s\"
\n",
+ f
name
, sl);
}
ret = 2;
} else {
}
ret = 2;
} else {