Changeset - r11191:fdc02cd82187
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-02-21 14:00:35
rubidium@openttd.org
(svn r15544) -Fix [FS#2650]: extracting downloaded content didn't work for Windows if one uses a non-ASCII.
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/network/network_content.cpp
Show inline comments
 
@@ -305,7 +305,8 @@ static bool GunzipFile(const ContentInfo
 
{
 
#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
 
	}
 

	
 
exit:
 
	if (fin != NULL) gzclose(fin);
 
	if (fin  != NULL) gzclose(fin);
 
	if (ftmp != NULL) fclose(ftmp);
 
	if (fout != NULL) fclose(fout);
 

	
 
	return ret;
0 comments (0 inline, 0 general)