Mention the fix to --safe-links/--copy-unsafe-links.
[rsync/rsync.git] / backup.c
index 934f838..ecc40d5 100644 (file)
--- a/backup.c
+++ b/backup.c
@@ -2,7 +2,7 @@
  * Backup handling code.
  *
  * Copyright (C) 1999 Andrew Tridgell
- * Copyright (C) 2003-2008 Wayne Davison
+ * Copyright (C) 2003-2009 Wayne Davison
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -295,7 +295,7 @@ static int keep_backup(const char *fname)
 #ifdef SUPPORT_LINKS
        if (!kept && preserve_links && S_ISLNK(file->mode)) {
                const char *sl = F_SYMLINK(file);
-               if (safe_symlinks && unsafe_symlink(sl, buf)) {
+               if (safe_symlinks && unsafe_symlink(sl, fname)) {
                        if (verbose) {
                                rprintf(FINFO, "ignoring unsafe symlink %s -> %s\n",
                                        full_fname(buf), sl);