]> Dogcows Code - chaz/tar/blobdiff - src/tar.c
(create_archive): Exclude pathnames if any of their components are
[chaz/tar] / src / tar.c
index 4d3ec0e26f937d23084dc2ae0957a2901a628f70..78243b6f7f30297459b3d5316542b89e2a949796 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -400,7 +400,7 @@ or a device.  *This* `tar' defaults to `-f%s -b%d'.\n"),
              DEFAULT_ARCHIVE, DEFAULT_BLOCKING);
       fputs (_("\
 \n\
-Report bugs to <tar-bugs@gnu.org>.\n"),
+Report bugs to <bug-tar@gnu.org>.\n"),
               stdout);
     }
   exit (status);
@@ -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:
This page took 0.022025 seconds and 4 git commands to generate.