Subversion Repositories spk

Rev

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

Rev 128 Rev 129
Line 410... Line 410...
410
 
410
 
411
	return true;
411
	return true;
412
}
412
}
413
 
413
 
414
 
414
 
415
void CBaseFile::RemoveAllFiles ( int type, int game )
415
void CBaseFile::removeAllFiles(FileType type, int game)
416
{
416
{
417
	if ( m_lFiles.empty() )
417
	if ( m_lFiles.empty() )
418
		return;
418
		return;
419
 
419
 
420
	for ( CListNode<C_File> *node = m_lFiles.Front(); node; node = node->next() )
420
	for ( CListNode<C_File> *node = m_lFiles.Front(); node; node = node->next() )
421
	{
421
	{
-
 
422
		if (game == 0 && node->Data()->game() && node->Data()->game() != GAME_ALLNEW)
-
 
423
			continue;
422
		if ( game > -1 ) {
424
		if ( game > -1 )
-
 
425
		{
-
 
426
			unsigned int fileGame = node->Data()->game() & ~GAME_ALLNEW;
423
			if ( node->Data()-&gt;GetGame() != game )
427
			if (fileGame != (1 &lt;< game))
-
 
428
			{
-
 
429
				// just remove the game from file
-
 
430
				if (fileGame & (1 << game))
-
 
431
					node->Data()->setGame(node->Data()->game() & ~(1 << game));
424
				continue;
432
				continue;
-
 
433
			}
425
		}
434
		}
426
		if ( type == -1 || node->Data()->GetFileType() == type )
435
		if ( type == FILETYPE_UNKNOWN || node->Data()->GetFileType() == type )
427
			node->DeleteData();
436
			node->DeleteData();
428
	}
437
	}
429
 
438
 
430
	m_lFiles.RemoveEmpty();
439
	m_lFiles.RemoveEmpty();
431
 
440
 
432
	_changed();
441
	_changed();
433
}
442
}
434
 
443
 
435
void CBaseFile::RecompressAllFiles ( int type, CProgressInfo *progress )
444
void CBaseFile::RecompressAllFiles ( int type, CProgressInfo *progress )
436
{
445
{
Line 440... Line 449...
440
		if ( progress )
449
		if ( progress )
441
			progress->UpdateFile(file);
450
			progress->UpdateFile(file);
442
 
451
 
443
		if ( file->GetCompressionType() == type )
452
		if ( file->GetCompressionType() == type )
444
			continue;
453
			continue;
445
 
454
 
446
		if ( !file->GetData() )
455
		if ( !file->GetData() )
447
			file->ReadFromFile();
456
			file->ReadFromFile();
448
 
457
 
449
		file->ChangeCompression ( type, progress );
458
		file->ChangeCompression ( type, progress );
450
	}
459
	}
451
}
460
}
452
 
461
 
453
void CBaseFile::CompressAllFiles ( int type, CProgressInfo *progress, CProgressInfo *overallProgress, int level )
462
void CBaseFile::CompressAllFiles ( int type, CProgressInfo *progress, CProgressInfo *overallProgress, int level )
454
{
463
{
455
	if ( overallProgress ) overallProgress->SetMax(m_lFiles.size());
464
	if ( overallProgress ) overallProgress->SetMax(m_lFiles.size());
456
 
465
 
Line 463... Line 472...
463
 
472
 
464
		if ( !file->GetData() )
473
		if ( !file->GetData() )
465
			file->ReadFromFile();
474
			file->ReadFromFile();
466
 
475
 
467
		file->CompressData ( type, progress, level );
476
		file->CompressData ( type, progress, level );
468
 
477
 
469
		if ( overallProgress ) overallProgress->SetDone(++iCount);
478
		if ( overallProgress ) overallProgress->SetDone(++iCount);
470
	}
479
	}
471
}
480
}
472
 
481
 
473
bool CBaseFile::UncompressAllFiles ( CProgressInfo *progress )
482
bool CBaseFile::UncompressAllFiles ( CProgressInfo *progress )
474
{
483
{
475
	int countFile = 0;
484
	int countFile = 0;
476
	for ( CListNode<C_File> *node = m_lFiles.Front(); node; node = node->next() )
485
	for ( CListNode<C_File> *node = m_lFiles.Front(); node; node = node->next() )
477
	{
486
	{
478
		C_File *fit = node->Data();
487
		C_File *fit = node->Data();
479
		if ( progress )
488
		if ( progress )
480
		{
489
		{
481
			progress->UpdateFile ( fit );
490
			progress->UpdateFile ( fit );
482
			progress->UpdateProgress(countFile++, m_lFiles.size());
491
			progress->UpdateProgress(countFile++, m_lFiles.size());
483
		}
492
		}
484
 
493
 
485
		bool uncomprToFile = false;
494
		bool uncomprToFile = false;
486
 
495
 
487
		if ( progress )
496
		if ( progress )
488
			progress->SwitchSecond();
497
			progress->SwitchSecond();
489
 
498
 
Line 499... Line 508...
499
					{
508
					{
500
						uncomprToFile = true;
509
						uncomprToFile = true;
501
						fit->SetFullDir("temp");
510
						fit->SetFullDir("temp");
502
					}
511
					}
503
				}
512
				}
504
 
513
 
505
				if (!uncomprToFile)
514
				if (!uncomprToFile)
506
					return false;
515
					return false;
507
			}
516
			}
508
		}
517
		}
509
 
518
 
Line 574... Line 583...
574
void CBaseFile::ClearNames ()
583
void CBaseFile::ClearNames ()
575
{
584
{
576
	m_lNames.clear(true);
585
	m_lNames.clear(true);
577
}
586
}
578
void CBaseFile::RemoveLanguageName ( int lang )
587
void CBaseFile::RemoveLanguageName ( int lang )
579
{
588
{
580
	SNames *n;
589
	SNames *n;
581
	for ( n = m_lNames.First(); n; n = m_lNames.Next() )
590
	for ( n = m_lNames.First(); n; n = m_lNames.Next() )
582
	{
591
	{
583
		if ( n->iLanguage == lang )
592
		if ( n->iLanguage == lang )
584
		{
593
		{
585
			m_lNames.RemoveCurrent();
594
			m_lNames.RemoveCurrent();
586
			delete n;
595
			delete n;
587
			_changed();
596
			_changed();
588
		}
597
		}
Line 605... Line 614...
605
	// not found, add a new entry
614
	// not found, add a new entry
606
	n = new SNames;
615
	n = new SNames;
607
	n->iLanguage = lang;
616
	n->iLanguage = lang;
608
	n->sName = name;
617
	n->sName = name;
609
	m_lNames.push_back ( n );
618
	m_lNames.push_back ( n );
610
 
619
 
611
	_changed();
620
	_changed();
612
}
621
}
613
 
622
 
614
CyString CBaseFile::GetFullPackageName(CyString format, int lang)
623
CyString CBaseFile::GetFullPackageName(CyString format, int lang)
615
{
624
{
Line 631... Line 640...
631
 
640
 
632
	if ( progress )
641
	if ( progress )
633
	{
642
	{
634
		progress->SetDone(0);
643
		progress->SetDone(0);
635
		progress->UpdateStatus(STATUS_COMPRESS);
644
		progress->UpdateStatus(STATUS_COMPRESS);
636
	}
645
	}
637
 
646
 
638
	if ( updateheader )
647
	if ( updateheader )
639
	{
648
	{
640
		m_SHeader2.iNumFiles = 0;
649
		m_SHeader2.iNumFiles = 0;
641
		m_SHeader2.lFullSize = 0;
650
		m_SHeader2.lFullSize = 0;
Line 1006... Line 1015...
1006
				pFile->SetFullDir ( filename + "PluginManager/Disabled/" + pFile->GetDirectory(this) );
1015
				pFile->SetFullDir ( filename + "PluginManager/Disabled/" + pFile->GetDirectory(this) );
1007
		}
1016
		}
1008
		pFile->SetDisabled(true);
1017
		pFile->SetDisabled(true);
1009
	}
1018
	}
1010
 
1019
 
1011
	CLog::logf(CLog::Log_Install, 2, "Adjusting the file pointer to correct install destintation, %s", pFile->GetFilePointer().c_str());
1020
	CLog::logf(CLog::Log_Install, 2, "Adjusting the file pointer to correct install destintation, %s", pFile->filePointer().c_str());
1012
 
1021
 
1013
	return filename.ToString();
1022
	return filename.ToString();
1014
}
1023
}
1015
 
1024
 
1016
C_File *CBaseFile::_install_checkFile(C_File *pFile, CyStringList *errorStr, bool *bDoFile, CLinkList<C_File> *pFileList)
1025
C_File *CBaseFile::_install_checkFile(C_File *pFile, CyStringList *errorStr, bool *bDoFile, CLinkList<C_File> *pFileList)
Line 1050... Line 1059...
1050
			CyString tofile = pCheckFile->filePointer().token("::", 2);
1059
			CyString tofile = pCheckFile->filePointer().token("::", 2);
1051
 
1060
 
1052
			CCatFile tocat;
1061
			CCatFile tocat;
1053
			int err = tocat.open(fit->filePointer().token("::", 1), "", CATREAD_CATDECRYPT, true);
1062
			int err = tocat.open(fit->filePointer().token("::", 1), "", CATREAD_CATDECRYPT, true);
1054
			if ( (err == CATERR_NONE) || (err == CATERR_CREATED) ) {
1063
			if ( (err == CATERR_NONE) || (err == CATERR_CREATED) ) {
1055
				tocat.AppendFile(pCheckFile->GetFilePointer().ToString(), tofile.ToString());
1064
				tocat.AppendFile(pCheckFile->filePointer(), tofile.ToString());
1056
				CLog::logf(CLog::Log_Install, 2, "Adding existing file into new mod File, %s => %s", fit->filePointer().token("::", 1).c_str(), tofile.c_str());
1065
				CLog::logf(CLog::Log_Install, 2, "Adding existing file into new mod File, %s => %s", fit->filePointer().token("::", 1).c_str(), tofile.c_str());
1057
			}
1066
			}
1058
 
1067
 
1059
			CCatFile fromcat;
1068
			CCatFile fromcat;
1060
			err = fromcat.open(pCheckFile->filePointer().token("::", 1), "", CATREAD_CATDECRYPT, false);
1069
			err = fromcat.open(pCheckFile->filePointer().token("::", 1), "", CATREAD_CATDECRYPT, false);
Line 1110... Line 1119...
1110
			if ( errorStr )
1119
			if ( errorStr )
1111
				errorStr->PushBack(CyString(sTo), ERRORLOG(SPKINSTALL_CREATEDIRECTORY));
1120
				errorStr->PushBack(CyString(sTo), ERRORLOG(SPKINSTALL_CREATEDIRECTORY));
1112
		}
1121
		}
1113
	}
1122
	}
1114
	else {
1123
	else {
1115
		CLog::logf(CLog::Log_Install, 2, "Adjusting file extension for file in mod, %s => %s", pFile->GetFilePointer().c_str(), CCatFile::PckChangeExtension(pFile->GetFilePointer().ToString()).c_str());
1124
		CLog::logf(CLog::Log_Install, 2, "Adjusting file extension for file in mod, %s => %s", pFile->filePointer().c_str(), CCatFile::PckChangeExtension(pFile->filePointer()).c_str());
1116
		pFile->SetFilename(CCatFile::PckChangeExtension(pFile->GetFilePointer().ToString()));
1125
		pFile->SetFilename(CCatFile::PckChangeExtension(pFile->filePointer()));
1117
	}
1126
	}
1118
 
1127
 
1119
	return true;
1128
	return true;
1120
}
1129
}
1121
 
1130
 
Line 1129... Line 1138...
1129
		sInstalledFile = pFile->GetFilePointer().Remove(sDestination);
1138
		sInstalledFile = pFile->GetFilePointer().Remove(sDestination);
1130
		if ( sInstalledFile[0] == '/' || sInstalledFile[0] == '\\' )
1139
		if ( sInstalledFile[0] == '/' || sInstalledFile[0] == '\\' )
1131
			sInstalledFile.Erase(0, 1);
1140
			sInstalledFile.Erase(0, 1);
1132
	}
1141
	}
1133
 
1142
 
1134
	if ( !pFile->WriteFilePointer() )
1143
	if ( !pFile->writeFilePointer() )
1135
	{
1144
	{
1136
		CLog::log(CLog::Log_Install, 1, "Failed to write the file");
1145
		CLog::log(CLog::Log_Install, 1, "Failed to write the file");
1137
		if ( errorStr )
1146
		if ( errorStr )
1138
			errorStr->PushBack(sInstalledFile, ERRORLOG(SPKINSTALL_WRITEFILE_FAIL));
1147
			errorStr->PushBack(sInstalledFile, ERRORLOG(SPKINSTALL_WRITEFILE_FAIL));
1139
	}
1148
	}
Line 1175... Line 1184...
1175
		// start the install process, check if we need to the file enabled or disabled
1184
		// start the install process, check if we need to the file enabled or disabled
1176
		CLog::logf(CLog::Log_Install, 1, "Preparing to install file: %s", fit->GetNameDirectory(this).c_str());
1185
		CLog::logf(CLog::Log_Install, 1, "Preparing to install file: %s", fit->GetNameDirectory(this).c_str());
1177
		bool fileEnabled = _install_setEnabled(enabled, fit);
1186
		bool fileEnabled = _install_setEnabled(enabled, fit);
1178
 
1187
 
1179
		// check if the file is for the correct game version
1188
		// check if the file is for the correct game version
1180
		if ( fit->GetGame() &&amp; packages->GetGame() ) {
1189
		if ( fit->game() && packages->GetGame() &amp;& fit->game() != GAME_ALLNEW) {
1181
			if ( fit->GetGame() != packages->GetGame() ) {
1190
			if(!(fit->game() & (1 << packages->GetGame())))
-
 
1191
			{
1182
				CLog::logf(CLog::Log_Install, 1, "File didn't match game version, skipping, %d != %d", fit->GetGame(), packages->GetGame());
1192
				CLog::logf(CLog::Log_Install, 1, "File didn't match game version, skipping, %d != %d", fit->game(), packages->GetGame());
1183
				continue;
1193
				continue;
1184
			}
1194
			}
1185
		}
1195
		}
1186
 
1196
 
1187
		// update the progress display to show we are processing this file
1197
		// update the progress display to show we are processing this file
1188
		if ( progress ) {
1198
		if ( progress ) {
1189
			if ( progress->IsSecond() ) progress->SwitchSecond();
1199
			if ( progress->IsSecond() ) progress->SwitchSecond();
1190
			progress->UpdateFile ( fit );
1200
			progress->UpdateFile ( fit );
1191
			progress->UpdateProgress(fileCount++, m_lFiles.size());
1201
			progress->UpdateProgress(fileCount++, m_lFiles.size());
1192
			progress->SwitchSecond();
1202
			progress->SwitchSecond();
1193
		}
1203
		}
1194
 
1204
 
1195
		// first uncompress the file
1205
		// first uncompress the file
1196
		//TODO: add this flag to C_File
1206
		//TODO: add this flag to C_File
1197
		bool uncomprToFile;
1207
		bool uncomprToFile;
1198
		if ( !this->_install_uncompress(fit, progress, errorStr, &uncomprToFile) ) {
1208
		if ( !this->_install_uncompress(fit, progress, errorStr, &uncomprToFile) ) {
1199
			bFailed = true;
1209
			bFailed = true;
Line 1236... Line 1246...
1236
					}
1246
					}
1237
					else
1247
					else
1238
					{
1248
					{
1239
						fit->SetFullDir ( CyString(sInstallDir) + fit->GetDirectory(this) );
1249
						fit->SetFullDir ( CyString(sInstallDir) + fit->GetDirectory(this) );
1240
						fit->SetDisabled(false);
1250
						fit->SetDisabled(false);
1241
					}
1251
					}
1242
				}
1252
				}
1243
				// move it to enabled
1253
				// move it to enabled
1244
				else {
1254
				else {
1245
					if ( !this->_install_checkFileEnable(cFile, fit, destdir.ToString(), fileEnabled, errorStr) ) {
1255
					if ( !this->_install_checkFileEnable(cFile, fit, destdir.ToString(), fileEnabled, errorStr) ) {
1246
						bFailed = true;
1256
						bFailed = true;
1247
						continue;
1257
						continue;
Line 1261... Line 1271...
1261
				m_iLastError = SPKERR_WRITEFILE;
1271
				m_iLastError = SPKERR_WRITEFILE;
1262
				CyString to = fit->GetDirectory(this);
1272
				CyString to = fit->GetDirectory(this);
1263
				if ( !fileEnabled )	to = CyString("PluginManager/Disabled/") + to;
1273
				if ( !fileEnabled )	to = CyString("PluginManager/Disabled/") + to;
1264
 
1274
 
1265
				if ( !_install_createDirectory(Dir, to.ToString(), fit, errorStr) ) {
1275
				if ( !_install_createDirectory(Dir, to.ToString(), fit, errorStr) ) {
1266
					bFailed = true;
1276
					bFailed = true;
1267
					continue;
1277
					continue;
1268
				}
1278
				}
1269
 
1279
 
1270
				int err = 1;
1280
				int err = 1;
1271
				m_sLastError = to;
1281
				m_sLastError = to;
1272
				if ( !fit->GetTempFile ().Empty() )	err = rename ( fit->GetTempFile().c_str(), to.c_str() );
1282
				if ( !fit->GetTempFile ().Empty() )	err = rename ( fit->GetTempFile().c_str(), to.c_str() );
1273
				if ( err ) {
1283
				if ( err ) {
1274
					bFailed = true;
1284
					bFailed = true;
1275
					continue;
1285
					continue;
1276
				}
1286
				}
1277
			}
1287
			}
1278
			//otherwise, just extract the file
1288
			//otherwise, just extract the file
1279
			else
1289
			else
1280
			{
1290
			{
1281
				// old file is found in list, switch to using new one
1291
				// old file is found in list, switch to using new one
1282
				if ( (filelist) && (adjustPointer) ) {
1292
				if ( (filelist) && (adjustPointer) ) {
1283
					adjustPointer->CopyData(fit, false);
1293
					adjustPointer->CopyData(fit, false);
1284
					CLog::log(CLog::Log_Install, 2, "Copying data into existing file");
1294
					CLog::log(CLog::Log_Install, 2, "Copying data into existing file");
1285
				}
1295
				}
Line 1328... Line 1338...
1328
	Desc:   Splits up the main header string to get all required settings
1338
	Desc:   Splits up the main header string to get all required settings
1329
*/
1339
*/
1330
bool CBaseFile::ParseHeader ( CyString header )
1340
bool CBaseFile::ParseHeader ( CyString header )
1331
{
1341
{
1332
	if ( !this->CheckHeader(header.GetToken ( 1, ';' ).ToString()) )
1342
	if ( !this->CheckHeader(header.GetToken ( 1, ';' ).ToString()) )
1333
		return false;
1343
		return false;
1334
 
1344
 
1335
	m_SHeader.fVersion = header.GetToken ( 2, ';' ).ToFloat();
1345
	m_SHeader.fVersion = header.GetToken ( 2, ';' ).ToFloat();
1336
	if ( m_SHeader.fVersion > FILEVERSION )
1346
	if ( m_SHeader.fVersion > FILEVERSION )
1337
		return false;
1347
		return false;
1338
 
1348
 
Line 1487... Line 1497...
1487
		m_sIconExt = line.token (":", 5);
1497
		m_sIconExt = line.token (":", 5);
1488
		m_pIconFile = new C_File ();
1498
		m_pIconFile = new C_File ();
1489
		m_pIconFile->SetDataSize ( size - 4 );
1499
		m_pIconFile->SetDataSize ( size - 4 );
1490
		m_pIconFile->SetDataCompression ( compression );
1500
		m_pIconFile->SetDataCompression ( compression );
1491
		m_pIconFile->SetUncompressedDataSize ( usize );
1501
		m_pIconFile->SetUncompressedDataSize ( usize );
1492
 
1502
 
1493
		return true;
1503
		return true;
1494
	}
1504
	}
1495
 
1505
 
1496
	time_t time = line.token(":", 5).toLong();
1506
	time_t time = line.token(":", 5).toLong();
1497
	bool compressToFile = (line.token(":", 6).toInt() == 1) ? true : false;
1507
	bool compressToFile = (line.token(":", 6).toInt() == 1) ? true : false;
Line 2065... Line 2075...
2065
					return true;
2075
					return true;
2066
			}
2076
			}
2067
			return false;
2077
			return false;
2068
		}
2078
		}
2069
 
2079
 
2070
		if ( !file->WriteToDir ( dir, this, includedir, NullString, data, len ) )
2080
		if ( !file->writeToDir(dir.ToString(), this, includedir, Utils::String::Null(), data, len) )
2071
			return false;
2081
			return false;
2072
 
2082
 
2073
		return true;
2083
		return true;
2074
 
2084
 
2075
	}
2085
	}
Line 2089... Line 2099...
2089
	// get the file pointer
2099
	// get the file pointer
2090
	C_File *file = m_lFiles.Get ( filenum );
2100
	C_File *file = m_lFiles.Get ( filenum );
2091
	return ExtractFile ( file, dir, includedir, progress );
2101
	return ExtractFile ( file, dir, includedir, progress );
2092
}
2102
}
2093
 
2103
 
2094
 
-
 
2095
 
-
 
2096
bool CBaseFile::ExtractAll ( CyString dir, int game, bool includedir, CProgressInfo *progress )
2104
bool CBaseFile::extractAll(const Utils::String &dir, int game, const Utils::CStringList &gameAddons, bool includedir, CProgressInfo *progress)
2097
{
2105
{
2098
	// no file to read from
2106
	// no file to read from
2099
	if ( this->filename().empty() )
2107
	if (this->filename().empty())
2100
		return false;
2108
		return false;
2101
 
2109
 
2102
	// now open the file
2110
	// now open the file
2103
	CFileIO *File = _startRead();
2111
	CFileIO *File = _startRead();
2104
	if ( !File ) return false;
2112
	if (!File) return false;
2105
 
2113
 
2106
	// now were in the file section
2114
	// now were in the file section
2107
	// skip past each one
2115
	// skip past each one
2108
	if ( m_pIconFile ) File->seek(4 + m_pIconFile->GetDataSize ());
2116
	if (m_pIconFile) File->seek(4 + m_pIconFile->GetDataSize());
2109
 
2117
 
2110
	CDirIO Dir(dir);
-
 
2111
 
-
 
2112
	for ( CListNode<C_File> *node = m_lFiles.Front(); node; node = node->next() ) {
2118
	for (CListNode<C_File> *node = m_lFiles.Front(); node; node = node->next()) {
2113
		C_File *fit = node->Data();
2119
		C_File *fit = node->Data();
2114
 
2120
 
2115
		if ( progress )	progress->UpdateFile ( fit );
2121
		if (progress)	progress->UpdateFile(fit);
2116
 
2122
 
2117
		if ( (!fit->GetDataSize ()) || (!fit->GetData()) ) {
2123
		if ((!fit->GetDataSize()) || (!fit->GetData())) {
2118
			if ( !fit->readFromFile(*File, fit->GetDataSize()) ) return false;
2124
			if (!fit->readFromFile(*File, fit->GetDataSize())) return false;
2119
		}
2125
		}
2120
		else
2126
		else
2121
			File->seek(fit->GetDataSize());
2127
			File->seek(fit->GetDataSize());
2122
 
2128
 
-
 
2129
		if (game && !fit->isForGame(game))
-
 
2130
			continue;
-
 
2131
 
2123
		if ( game ) {
2132
		CDirIO Dir(dir);
-
 
2133
		Utils::String addonDir;
-
 
2134
		if (fit->isFileInAddon())
-
 
2135
		{
-
 
2136
			int addonGame = fit->getForSingleGame();
2124
			if ( fit->GetGame() && fit->GetGame() != game )
2137
			if (!addonGame) addonGame = game;
-
 
2138
 
2125
				continue;
2139
			if (addonGame >; 0)
-
 
2140
				addonDir = gameAddons.findString(Utils::String::Number(addonGame));
2126
		}
2141
		}
-
 
2142
 
-
 
2143
		if (!addonDir.empty())
-
 
2144
			Dir.cd(addonDir);
2127
 
2145
 
2128
		// create directory first
2146
		// create directory first
2129
		Dir.Create(fit->GetDirectory(this));
2147
		Dir.create(fit->getDirectory(this));
2130
 
2148
 
2131
		long size = 0;
2149
		long size = 0;
2132
		unsigned char *data = fit->UncompressData (&size, progress);
2150
		unsigned char *data = fit->UncompressData(&size, progress);
2133
		if ( (!data) &;& (fit->GetCompressionType() == SPKCOMPRESS_7ZIP) ) {
2151
		if ((!data) &&; (fit->GetCompressionType() == SPKCOMPRESS_7ZIP)) {
2134
			if ( !fit->UncompressToFile ( dir, this, includedir, progress ) ) return false;
2152
			if (!fit->UncompressToFile(Dir.dir(), this, includedir, progress)) return false;
2135
		}
2153
		}
2136
		else if ( (!data) || (!fit->WriteToDir ( dir, this, includedir, NullString, data, size )) ) return false;
2154
		else if ((!data) || (!fit->writeToDir(Dir.dir(), this, includedir, Utils::String::Null(), data, size))) return false;
2137
	}
2155
	}
2138
 
2156
 
2139
	delete File;
2157
	delete File;
2140
	return true;
2158
	return true;
2141
}
2159
}
2142
 
-
 
2143
 
2160
 
2144
 
2161
 
2145
 
2162
 
2146
bool CBaseFile::UpdateSigned (bool updateFiles)
2163
bool CBaseFile::UpdateSigned (bool updateFiles)
2147
{
2164
{