Skip to content

Commit

Permalink
In "ignoring unsafe symlink" messages, show only the file-list path.
Browse files Browse the repository at this point in the history
Rsync was showing the full destination path, which was confusing because
nothing is created at that path and was especially bogus in combination
with the source name of a solo file.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506830
  • Loading branch information
mattmccutchen authored and Wayne Davison committed Apr 24, 2010
1 parent be8234c commit 7a3ce97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
rprintf(FINFO, "ignoring unsafe symlink %s -> %s\n",
full_fname(buf), sl);
rprintf(FINFO, "not backing up unsafe symlink \"%s\" -> \"%s\"\n",
fname, sl);
}
ret = 2;
} else {
Expand Down
6 changes: 4 additions & 2 deletions generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,10 +1355,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
if (safe_symlinks && unsafe_symlink(sl, fname)) {
if (INFO_GTE(NAME, 1)) {
if (solo_file)
/* fname contains the destination path, but we
* want to report the source path. */
fname = f_name(file, NULL);
rprintf(FINFO,
"ignoring unsafe symlink %s -> \"%s\"\n",
full_fname(fname), sl);
"ignoring unsafe symlink \"%s\" -> \"%s\"\n",
fname, sl);
}
return;
}
Expand Down

0 comments on commit 7a3ce97

Please sign in to comment.