If the partial-dir value is relative, add a directory-exclude for it
authorWayne Davison <wayned@samba.org>
Wed, 22 Sep 2004 04:12:13 +0000 (04:12 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 22 Sep 2004 04:12:13 +0000 (04:12 +0000)
to the end of the user's exclude list.

options.c

index 348a2da..3cee4ba 100644 (file)
--- a/options.c
+++ b/options.c
@@ -839,6 +839,10 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                if (partial_dir) {
                        if (!*partial_dir || strcmp(partial_dir, ".") == 0)
                                partial_dir = NULL;
                if (partial_dir) {
                        if (!*partial_dir || strcmp(partial_dir, ".") == 0)
                                partial_dir = NULL;
+                       else if (*partial_dir != '/') {
+                               add_exclude(&exclude_list, partial_dir,
+                                           XFLG_DIRECTORY);
+                       }
                        keep_partial = 1;
                }
        }
                        keep_partial = 1;
                }
        }