* dump_setup.cc (find_tar_ext): Generalize search for .tar extension, avoiding

looking for specific compression types.
This commit is contained in:
Christopher Faylor 2013-09-16 17:01:58 +00:00
parent 00fd23d50f
commit 9a2f0cff8f
2 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2013-09-16 Christopher Faylor <me.cygwin2013@cgf.cx>
* dump_setup.cc (find_tar_ext): Generalize search for .tar extension,
avoiding looking for specific compression types.
2013-08-23 Christopher Faylor <me.cygwin2013@cgf.cx>
* cygcheck.cc (package_grep): Accommodate arch-specific package layout.

View File

@ -41,18 +41,13 @@ typedef struct
static int
find_tar_ext (const char *path)
{
char *p = strchr (path, '\0') - 7;
char *p = strchr (path, '\0') - 9;
if (p <= path)
return 0;
if (*p == '.')
{
if (strcmp (p, ".tar.gz") != 0)
return 0;
}
else if (--p <= path || strcmp (p, ".tar.bz2") != 0)
if ((p = strstr (p, ".tar")) != NULL)
return p - path;
else
return 0;
return p - path;
}
static char *