Call clean_flist() with its new "collapse_dot_dot" arg.
authorWayne Davison <wayned@samba.org>
Thu, 12 Aug 2004 18:20:07 +0000 (18:20 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 12 Aug 2004 18:20:07 +0000 (18:20 +0000)
flist.c
log.c
options.c

diff --git a/flist.c b/flist.c
index 743df09..4e0af36 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -570,7 +570,7 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags,
 
        strlcpy(lastname, thisname, MAXPATHLEN);
 
 
        strlcpy(lastname, thisname, MAXPATHLEN);
 
-       clean_fname(thisname);
+       clean_fname(thisname, 0);
 
        if (sanitize_paths)
                sanitize_path(thisname, thisname, "", 0);
 
        if (sanitize_paths)
                sanitize_path(thisname, thisname, "", 0);
@@ -761,7 +761,7 @@ struct file_struct *make_file(char *fname, struct file_list *flist,
                rprintf(FINFO, "skipping overly long name: %s\n", fname);
                return NULL;
        }
                rprintf(FINFO, "skipping overly long name: %s\n", fname);
                return NULL;
        }
-       clean_fname(thisname);
+       clean_fname(thisname, 0);
        if (sanitize_paths)
                sanitize_path(thisname, thisname, "", 0);
 
        if (sanitize_paths)
                sanitize_path(thisname, thisname, "", 0);
 
diff --git a/log.c b/log.c
index daf96b4..0b55457 100644 (file)
--- a/log.c
+++ b/log.c
@@ -373,7 +373,7 @@ static void log_formatted(enum logcode code,
                        pathjoin(buf2, sizeof buf2,
                                 file->basedir ? file->basedir : "",
                                 f_name(file));
                        pathjoin(buf2, sizeof buf2,
                                 file->basedir ? file->basedir : "",
                                 f_name(file));
-                       clean_fname(buf2);
+                       clean_fname(buf2, 0);
                        n = buf2;
                        if (*n == '/') n++;
                        break;
                        n = buf2;
                        if (*n == '/') n++;
                        break;
index 805b9e1..ec42bf8 100644 (file)
--- a/options.c
+++ b/options.c
@@ -743,28 +743,28 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
        if (server_exclude_list.head && !am_sender) {
                struct exclude_list_struct *elp = &server_exclude_list;
                if (tmpdir) {
        if (server_exclude_list.head && !am_sender) {
                struct exclude_list_struct *elp = &server_exclude_list;
                if (tmpdir) {
-                       clean_fname(tmpdir);
+                       clean_fname(tmpdir, 1);
                        if (check_exclude(elp, tmpdir, 1) < 0)
                                goto options_rejected;
                }
                if (partial_dir) {
                        if (check_exclude(elp, tmpdir, 1) < 0)
                                goto options_rejected;
                }
                if (partial_dir) {
-                       clean_fname(partial_dir);
+                       clean_fname(partial_dir, 1);
                        if (check_exclude(elp, partial_dir, 1) < 0)
                                goto options_rejected;
                }
                if (compare_dest) {
                        if (check_exclude(elp, partial_dir, 1) < 0)
                                goto options_rejected;
                }
                if (compare_dest) {
-                       clean_fname(compare_dest);
+                       clean_fname(compare_dest, 1);
                        if (check_exclude(elp, compare_dest, 1) < 0)
                                goto options_rejected;
                }
                if (backup_dir) {
                        if (check_exclude(elp, compare_dest, 1) < 0)
                                goto options_rejected;
                }
                if (backup_dir) {
-                       clean_fname(backup_dir);
+                       clean_fname(backup_dir, 1);
                        if (check_exclude(elp, backup_dir, 1) < 0)
                                goto options_rejected;
                }
        }
        if (server_exclude_list.head && files_from) {
                        if (check_exclude(elp, backup_dir, 1) < 0)
                                goto options_rejected;
                }
        }
        if (server_exclude_list.head && files_from) {
-               clean_fname(files_from);
+               clean_fname(files_from, 1);
                if (check_exclude(&server_exclude_list, files_from, 0) < 0) {
                    options_rejected:
                        snprintf(err_buf, sizeof err_buf,
                if (check_exclude(&server_exclude_list, files_from, 0) < 0) {
                    options_rejected:
                        snprintf(err_buf, sizeof err_buf,