From 4019fd3bd11d92d4342bede66c80f1fbdd3653aa Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 19 Dec 2013 14:41:51 +0000 Subject: [PATCH] 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 --- uppsrc/Core/z.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/uppsrc/Core/z.cpp b/uppsrc/Core/z.cpp index 440be2a60..318aec44d 100644 --- a/uppsrc/Core/z.cpp +++ b/uppsrc/Core/z.cpp @@ -457,9 +457,13 @@ bool GZDecompressFile(const char *dstfile, const char *srcfile, Gate2 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); }