X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Ftar.c;h=32e8522f8d3c0c1b9a62bb98abe9ed171a9844a3;hb=2016526b1a880b8375d9c77299d3339122fccc0e;hp=4d3ec0e26f937d23084dc2ae0957a2901a628f70;hpb=a8c32ecff2f8f8adb2186852e02e29f74f7850f7;p=chaz%2Ftar diff --git a/src/tar.c b/src/tar.c index 4d3ec0e..32e8522 100644 --- a/src/tar.c +++ b/src/tar.c @@ -452,6 +452,7 @@ decode_options (int argc, char *const *argv) archive_format = DEFAULT_FORMAT; blocking_factor = DEFAULT_BLOCKING; record_size = DEFAULT_BLOCKING * BLOCKSIZE; + excluded = new_exclude (); owner_option = -1; group_option = -1; @@ -783,8 +784,8 @@ decode_options (int argc, char *const *argv) break; case 'X': - exclude_option = 1; - add_exclude_file (optarg); + if (add_exclude_file (excluded, optarg, '\n') != 0) + FATAL_ERROR ((0, errno, "%s", optarg)); break; case 'z': @@ -810,8 +811,7 @@ decode_options (int argc, char *const *argv) break; case EXCLUDE_OPTION: - exclude_option = 1; - add_exclude (optarg); + add_exclude (excluded, optarg); break; case GROUP_OPTION: