Core: GZDecompressFille now supports .gzip extension too (in addition to .gz)

git-svn-id: svn://ultimatepp.org/upp/trunk@6683 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2013-12-19 14:41:51 +00:00
parent bf75a3b340
commit 4019fd3bd1

View file

@ -457,9 +457,13 @@ bool GZDecompressFile(const char *dstfile, const char *srcfile, Gate2<int64, int
bool GZDecompressFile(const char *srcfile, Gate2<int64, int64> progress)
{
String dstfile = srcfile;
if(!dstfile.EndsWith(".gz"))
if(dstfile.EndsWith(".gz"))
dstfile.Trim(dstfile.GetLength() - 3);
else
if(dstfile.EndsWith(".gzip"))
dstfile.Trim(dstfile.GetLength() - 5);
else
return false;
dstfile.Trim(dstfile.GetLength() - 3);
return GZDecompressFile(dstfile, srcfile, progress);
}