Subversion Repositories spk

Rev

Rev 238 | Rev 248 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 238 Rev 241
Line 9342... Line 9342...
9342
 
9342
 
9343
CBaseFile *CPackages::_archive_fromZip(const Utils::WString &filename, bool toInstall) const
9343
CBaseFile *CPackages::_archive_fromZip(const Utils::WString &filename, bool toInstall) const
9344
{
9344
{
9345
	CBaseFile *archive = NULL;
9345
	CBaseFile *archive = NULL;
9346
 
9346
 
9347
	TCHAR buf[5000];
-
 
9348
	wsprintf(buf, L"%hs", filename.c_str());
-
 
9349
	HZIP hz = OpenZip(buf, 0);
9347
	HZIP hz = OpenZip(filename.c_str(), 0);
9350
	if ( !hz ) 
9348
	if ( !hz ) 
9351
		return NULL;
9349
		return NULL;
9352
 
9350
 
9353
	int index;
9351
	int index;
9354
	// move the files from the zip to the package
9352
	// move the files from the zip to the package
9355
	ZIPENTRY ze;
9353
	ZIPENTRY ze;
9356
	if ( FindZipItem(hz, L"pluginmanager.txt", true, &index, &ze) == Z_OK )
9354
	if ( FindZipItem(hz, L"pluginmanager.txt", true, &index, &ze) == Z_OK )
9357
		toInstall = false;
9355
		toInstall = false;
9358
	CloseZip(hz);
9356
	CloseZip(hz);
9359
 
9357
 
9360
	hz = OpenZip(buf, 0);
9358
	hz = OpenZip(filename.c_str(), 0);
9361
	if ( !hz ) 
9359
	if ( !hz ) 
9362
		return NULL;
9360
		return NULL;
9363
 
9361
 
9364
	// create the correct package
9362
	// create the correct package
9365
	if ( toInstall )
9363
	if ( toInstall )