]> Dogcows Code - chaz/tar/blobdiff - src/names.c
Avoid compiler warnings.
[chaz/tar] / src / names.c
index 9cff7ed3d6c9b5b985b85df948441ac1f9a44b6c..585ad39ba7238ff6e7583a6afe89c08c6da35923 100644 (file)
@@ -1,11 +1,11 @@
 /* Various processing of names.
 
    Copyright (C) 1988, 1992, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
 /* Various processing of names.
 
    Copyright (C) 1988, 1992, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
-   2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option) any later
+   Free Software Foundation; either version 3, or (at your option) any later
    version.
 
    This program is distributed in the hope that it will be useful, but
    version.
 
    This program is distributed in the hope that it will be useful, but
@@ -812,6 +812,10 @@ collect_and_sort_names (void)
       next_name = name->next;
       if (name->found_count || name->dir_contents)
        continue;
       next_name = name->next;
       if (name->found_count || name->dir_contents)
        continue;
+      if (name->matching_flags & EXCLUDE_WILDCARDS)
+       /* NOTE: EXCLUDE_ANCHORED is not relevant here */
+       /* FIXME: just skip regexps for now */
+       continue;
       chdir_do (name->change_dir);
       if (name->name[0] == 0)
        continue;
       chdir_do (name->change_dir);
       if (name->name[0] == 0)
        continue;
@@ -1008,11 +1012,10 @@ contains_dot_dot (char const *name)
       if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
        return 1;
 
       if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
        return 1;
 
-      do
+      while (! ISSLASH (*p))
        {
          if (! *p++)
            return 0;
        }
        {
          if (! *p++)
            return 0;
        }
-      while (! ISSLASH (*p));
     }
 }
     }
 }
This page took 0.021344 seconds and 4 git commands to generate.