Fix path check when prior_dir_file is NULL.
authorWayne Davison <wayned@samba.org>
Sat, 4 Jun 2016 18:53:33 +0000 (11:53 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 4 Jun 2016 18:53:33 +0000 (11:53 -0700)
generator.c

index fd7c8f863646a5a4ef2142a27938c042512d9448..fe5fece106a06539d70f2aa680a23e86197e4435 100644 (file)
@@ -1266,7 +1266,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                         * this function was asked to process in the file list. */
                        if (!inc_recurse
                         && (*dn != '.' || dn[1]) /* Avoid an issue with --relative and the "." dir. */
-                        && (prior_dir_file && strcmp(dn, f_name(prior_dir_file, NULL)) != 0)
+                        && (!prior_dir_file || strcmp(dn, f_name(prior_dir_file, NULL)) != 0)
                         && flist_find_name(cur_flist, dn, 1) < 0) {
                                rprintf(FERROR,
                                        "ABORTING due to invalid path from sender: %s/%s\n",