strip the same files when archiving and extracting

This commit is contained in:
Chris Danford
2006-02-01 04:48:21 +00:00
parent 5467ab21ed
commit 4c5340c6c4
4 changed files with 29 additions and 12 deletions
+17
View File
@@ -215,6 +215,23 @@ RString SMPackageUtil::GetLanguageCodeFromDisplayString( const RString &sDisplay
return s;
}
void SMPackageUtil::StripIgnoredSmzipFiles( vector<RString> &vsFilesInOut )
{
for( int i=vsFilesInOut.size()-1; i>=0; i-- )
{
const RString &sFile = vsFilesInOut[i];
bool bEraseThis = false;
bEraseThis |= EndsWith( sFile, "smzip.ctl" );
bEraseThis |= EndsWith( sFile, ".old" );
bEraseThis |= EndsWith( sFile, "Thumbs.db" );
bEraseThis |= (sFile.find("CVS") != string::npos);
if( bEraseThis )
vsFilesInOut.erase( vsFilesInOut.begin()+i );
}
}
bool SMPackageUtil::DoesOsAbsoluteFileExist( const RString &sOsAbsoluteFile )
{
#if defined(WIN32)