Subversion Repositories spk

Rev

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

Rev 121 Rev 125
Line 687... Line 687...
687
		return false;
687
		return false;
688
 
688
 
689
	if ( file->GetDir() != m_sDir )
689
	if ( file->GetDir() != m_sDir )
690
		return false;
690
		return false;
691
 
691
 
692
	if ( file->GetName() != m_sName ) {
692
	if ( file->GetName() != m_sName )
-
 
693
	{
-
 
694
		// check if the base name matches, but only for certain file extensions
693
		// check alternate filename
695
		if (file->shouldCheckBaseName())
-
 
696
		{
694
		Utils::String baseName = CFileIO(file->GetName()).dir() + "/" + CFileIO(file->GetName()).baseName();
697
			Utils::String baseName = CFileIO(file->GetName()).dir() + "/" + CFileIO(file->GetName()).baseName();
695
		Utils::String compareBaseName = CFileIO(m_sName).dir() + "/" + CFileIO(m_sName).baseName();
698
			Utils::String compareBaseName = CFileIO(m_sName).dir() + "/" + CFileIO(m_sName).baseName();
696
		if ( !baseName.Compare(compareBaseName) )
699
			if (baseName.Compare(compareBaseName))
-
 
700
				return true;
-
 
701
		}
697
			return false;
702
		return false;
698
	}
703
	}
699
 
704
 
700
	return true;
705
	return true;
701
}
706
}
702
 
707
 
Line 1810... Line 1815...
1810
		return true;
1815
		return true;
1811
 
1816
 
1812
	return false;
1817
	return false;
1813
}
1818
}
1814
 
1819
 
-
 
1820
bool C_File::shouldCheckBaseName() const
-
 
1821
{
-
 
1822
	Utils::String ext = CFileIO(m_sName).extension();
-
 
1823
	if (ext == "xml" || ext == "txt" || ext == "pck")
-
 
1824
		return true;
-
 
1825
	if (ext == "bod" || ext == "bob" || ext == "pbb" || ext == "pbd")
-
 
1826
		return true;
-
 
1827
	return false;
-
 
1828
}
-
 
1829
 
-
 
1830
 
1815
unsigned char *C_File::BobDecompile(size_t *size)
1831
unsigned char *C_File::BobDecompile(size_t *size)
1816
{
1832
{
1817
	(*size) = 0;
1833
	(*size) = 0;
1818
 
1834
 
1819
	Utils::String fromFile = this->GetFilePointer().ToString();
1835
	Utils::String fromFile = this->GetFilePointer().ToString();