| Line 57... | Line 57... | 
          
            | 57 | 	// extract the matching file
 | 57 | 	// extract the matching file
 | 
          
            | 58 | 	Utils::String sToFile = CFileIO(m_sTempDir + "/" + CFileIO(c->sFile).filename()).fullFilename();
 | 58 | 	Utils::String sToFile = CFileIO(m_sTempDir + "/" + CFileIO(c->sFile).filename()).fullFilename();
 | 
          
            | 59 | 	if ( !m_pCatFile->ExtractFile(sModFile, sToFile) ) return false;
 | 59 | 	if ( !m_pCatFile->ExtractFile(sModFile, sToFile) ) return false;
 | 
          
            | 60 |  
 | 60 |  
 | 
          
            | 61 | 	// create a diff
 | 61 | 	// create a diff
 | 
          
            | 62 | 	Utils::String to = m_fileSystem.ExtractGameFile(c->sFile.ToString(),sToFile + ".compare");
 | 62 | 	Utils::String to = m_fileSystem.ExtractGameFile(c->sFile, sToFile + ".compare");
 | 
          
            | 63 | 	if ( !to.empty() ) {
 | 63 | 	if ( !to.empty() ) {
 | 
          
            | 64 | 		SDiffFile *diff = diffFile(to, sToFile, c->sFile.ToString());
 | 64 | 		SDiffFile *diff = diffFile(to, sToFile, c->sFile);
 | 
          
            | 65 | 		if ( diff ) { 
 | 65 | 		if ( diff ) { 
 | 
          
            | 66 | 			this->_adjustFile(sModFile, diff, false);
 | 66 | 			this->_adjustFile(sModFile, diff, false);
 | 
          
            | 67 | 		}
 | 67 | 		}
 | 
          
            | 68 | 		CFileIO::Remove(to);
 | 68 | 		CFileIO::Remove(to);
 | 
          
            | 69 | 	}
 | 69 | 	}
 | 
          
            | Line 179... | Line 179... | 
          
            | 179 |  
 | 179 |  
 | 
          
            | 180 | 	// we'll need to read in all the types/text files
 | 180 | 	// we'll need to read in all the types/text files
 | 
          
            | 181 | 	for ( int i = 0; i < cat.GetNumFiles(); i++ )
 | 181 | 	for ( int i = 0; i < cat.GetNumFiles(); i++ )
 | 
          
            | 182 | 	{
 | 182 | 	{
 | 
          
            | 183 | 		SInCatFile *f = cat.GetFile(i);
 | 183 | 		SInCatFile *f = cat.GetFile(i);
 | 
          
            | 184 | 		Utils::String checkFile = f->sFile.FindReplace("\\", "/").ToString();
 | 184 | 		Utils::String checkFile = f->sFile.findReplace("\\", "/");
 | 
          
            | 185 | 		if ( (checkFile.left(6).Compare("types/") || checkFile.left(2).Compare("t/") || checkFile.left(6 + addonSize).Compare(addonDir + "/types/") || checkFile.left(2 + addonSize).Compare(addonDir + "/t/")) && _validFile(checkFile) )
 | 185 | 		if ( (checkFile.left(6).Compare("types/") || checkFile.left(2).Compare("t/") || checkFile.left(6 + addonSize).Compare(addonDir + "/types/") || checkFile.left(2 + addonSize).Compare(addonDir + "/t/")) && _validFile(checkFile) )
 | 
          
            | 186 | 		{
 | 186 | 		{
 | 
          
            | 187 | 			// extract the file to the temp dir
 | 187 | 			// extract the file to the temp dir
 | 
          
            | 188 | 			Utils::String toFile = CFileIO(m_sTempDir + "/" + CFileIO(f->sFile).filename()).fullFilename();
 | 188 | 			Utils::String toFile = CFileIO(m_sTempDir + "/" + CFileIO(f->sFile).filename()).fullFilename();
 | 
          
            | 189 | 			if ( cat.ExtractFile(f, toFile ) )
 | 189 | 			if ( cat.ExtractFile(f, toFile ) )
 | 
          
            | 190 | 			{
 | 190 | 			{
 | 
          
            | 191 | 				// now extract the matching file from the game dir
 | 191 | 				// now extract the matching file from the game dir
 | 
          
            | 192 | 				if ( m_fileSystem.ExtractGameFile(f->sFile.ToString(),toFile + ".compare") )
 | 192 | 				if ( m_fileSystem.ExtractGameFile(f->sFile, toFile + ".compare") )
 | 
          
            | 193 | 				{
 | 193 | 				{
 | 
          
            | 194 | 					diffFile(toFile + ".compare", toFile, f->sFile.ToString());
 | 194 | 					diffFile(toFile + ".compare", toFile, f->sFile);
 | 
          
            | 195 | 					CFileIO::Remove(toFile + ".compare");
 | 195 | 					CFileIO::Remove(toFile + ".compare");
 | 
          
            | 196 | 				}
 | 196 | 				}
 | 
          
            | 197 | 				// make sure we clear up afterwards
 | 197 | 				// make sure we clear up afterwards
 | 
          
            | 198 | 				CFileIO::Remove(toFile);
 | 198 | 				CFileIO::Remove(toFile);
 | 
          
            | 199 | 			}
 | 199 | 			}
 |