looking for specific compression types.
+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.
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 *