(svn r15544) -Fix [FS#2650]: extracting downloaded content didn't work for Windows if one uses a non-ASCII.

This commit is contained in:
rubidium 2009-02-21 14:00:35 +00:00
parent a4567f243d
commit fdc2e85184

View File

@ -305,7 +305,8 @@ static bool GunzipFile(const ContentInfo *ci)
{
#if defined(WITH_ZLIB)
bool ret = true;
gzFile fin = gzopen(GetFullFilename(ci, true), "rb");
FILE *ftmp = fopen(GetFullFilename(ci, true), "rb");
gzFile fin = gzdopen(fileno(ftmp), "rb");
FILE *fout = fopen(GetFullFilename(ci, false), "wb");
if (fin == NULL || fout == NULL) {
@ -323,7 +324,8 @@ static bool GunzipFile(const ContentInfo *ci)
}
exit:
if (fin != NULL) gzclose(fin);
if (fin != NULL) gzclose(fin);
if (ftmp != NULL) fclose(ftmp);
if (fout != NULL) fclose(fout);
return ret;