Moved the sanitizing of a symlink's link string here from flist.c.
authorWayne Davison <wayned@samba.org>
Tue, 2 May 2006 16:52:51 +0000 (16:52 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 2 May 2006 16:52:51 +0000 (16:52 +0000)
generator.c

index 4c711cd..1860b0d 100644 (file)
@@ -50,6 +50,8 @@ extern int delete_before;
 extern int delete_during;
 extern int delete_after;
 extern int module_id;
+extern int sanitize_paths;
+extern int startdir_depth;
 extern int ignore_errors;
 extern int remove_sent_files;
 extern int delay_updates;
@@ -953,6 +955,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        }
                        return;
                }
+               if (sanitize_paths) {
+                       sanitize_path(file->u.link, file->u.link, "",
+                                     startdir_depth + file->dir.depth - 1);
+               }
                if (statret == 0) {
                        char lnk[MAXPATHLEN];
                        int len;