Fixed the patch (it had bit-rotted over time). Also changed it
[rsync/rsync-patches.git] / links-depth.diff
index bf4d031..bf75d9a 100644 (file)
@@ -6,7 +6,7 @@ with the latest codebase, but even in its original form it didn't
 handle relative symlinks properly, and that has not yet been fixed
 in this modified version.
 
---- orig/flist.c       2005-08-17 06:45:07
+--- orig/flist.c       2005-11-10 16:58:36
 +++ flist.c    2004-07-16 16:58:04
 @@ -45,6 +45,7 @@ extern int filesfrom_fd;
  extern int one_file_system;
@@ -16,10 +16,10 @@ in this modified version.
  extern int preserve_hard_links;
  extern int preserve_perms;
  extern int preserve_devices;
-@@ -734,6 +735,30 @@ static struct file_struct *receive_file_
+@@ -718,6 +719,30 @@ static struct file_struct *receive_file_
+       return file;
  }
  
 +#if SUPPORT_LINKS
 +static int links_depth(char *linkname, STRUCT_STAT *st_ptr)
 +{
@@ -47,7 +47,7 @@ in this modified version.
  /**
   * Create a file_struct for a named file by reading its stat()
   * information and performing extensive checks against global
-@@ -859,7 +884,13 @@ skip_filters:
+@@ -843,7 +868,13 @@ struct file_struct *make_file(char *fnam
        basename_len = strlen(basename) + 1; /* count the '\0' */
  
  #ifdef SUPPORT_LINKS
@@ -62,9 +62,9 @@ in this modified version.
  #else
        linkname_len = 0;
  #endif
---- orig/options.c     2005-08-27 21:11:26
+--- orig/options.c     2005-11-15 07:01:03
 +++ options.c  2005-08-27 21:22:39
-@@ -42,6 +42,7 @@ int append_mode = 0;
+@@ -43,6 +43,7 @@ int append_mode = 0;
  int keep_dirlinks = 0;
  int copy_links = 0;
  int preserve_links = 0;
@@ -72,7 +72,7 @@ in this modified version.
  int preserve_hard_links = 0;
  int preserve_perms = 0;
  int preserve_devices = 0;
-@@ -278,6 +279,7 @@ void usage(enum logcode F)
+@@ -284,6 +285,7 @@ void usage(enum logcode F)
    rprintf(F,"     --append                append data onto shorter files\n");
    rprintf(F," -d, --dirs                  transfer directories without recursing\n");
    rprintf(F," -l, --links                 copy symlinks as symlinks\n");
@@ -80,7 +80,7 @@ in this modified version.
    rprintf(F," -L, --copy-links            transform symlink into referent file/dir\n");
    rprintf(F,"     --copy-unsafe-links     only \"unsafe\" symlinks are transformed\n");
    rprintf(F,"     --safe-links            ignore symlinks that point outside the source tree\n");
-@@ -402,6 +404,7 @@ static struct poptOption long_options[] 
+@@ -416,6 +418,7 @@ static struct poptOption long_options[] 
    {"links",           'l', POPT_ARG_VAL,    &preserve_links, 1, 0, 0 },
    {"no-links",         0,  POPT_ARG_VAL,    &preserve_links, 0, 0, 0 },
    {"no-l",             0,  POPT_ARG_VAL,    &preserve_links, 0, 0, 0 },
@@ -88,9 +88,9 @@ in this modified version.
    {"copy-links",      'L', POPT_ARG_NONE,   &copy_links, 0, 0, 0 },
    {"copy-unsafe-links",0,  POPT_ARG_NONE,   &copy_unsafe_links, 0, 0, 0 },
    {"safe-links",       0,  POPT_ARG_NONE,   &safe_symlinks, 0, 0, 0 },
---- orig/rsync.yo      2005-08-27 21:05:12
+--- orig/rsync.yo      2005-11-15 07:01:04
 +++ rsync.yo   2005-01-28 19:33:40
-@@ -312,6 +312,7 @@ to the detailed description below for a 
+@@ -310,6 +310,7 @@ to the detailed description below for a 
       --append                append data onto shorter files
   -d, --dirs                  transfer directories without recursing
   -l, --links                 copy symlinks as symlinks