* dump_setup.cc (find_tar_ext): Generalize search for .tar extension, avoiding
looking for specific compression types.
This commit is contained in:
parent
00fd23d50f
commit
9a2f0cff8f
@ -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>
|
2013-08-23 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||||
|
|
||||||
* cygcheck.cc (package_grep): Accommodate arch-specific package layout.
|
* cygcheck.cc (package_grep): Accommodate arch-specific package layout.
|
||||||
|
@ -41,18 +41,13 @@ typedef struct
|
|||||||
static int
|
static int
|
||||||
find_tar_ext (const char *path)
|
find_tar_ext (const char *path)
|
||||||
{
|
{
|
||||||
char *p = strchr (path, '\0') - 7;
|
char *p = strchr (path, '\0') - 9;
|
||||||
if (p <= path)
|
if (p <= path)
|
||||||
return 0;
|
return 0;
|
||||||
if (*p == '.')
|
if ((p = strstr (p, ".tar")) != NULL)
|
||||||
{
|
return p - path;
|
||||||
if (strcmp (p, ".tar.gz") != 0)
|
else
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else if (--p <= path || strcmp (p, ".tar.bz2") != 0)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return p - path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user