mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r15544) -Fix [FS#2650]: extracting downloaded content didn't work for Windows if one uses a non-ASCII.
This commit is contained in:
parent
a4567f243d
commit
fdc2e85184
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user