Subversion Repositories spk

Rev

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

Rev 130 Rev 131
Line 161... Line 161...
161
Utils::String C_File::getDirectory(CBaseFile *file) const
161
Utils::String C_File::getDirectory(CBaseFile *file) const
162
{
162
{
163
	if (IsFakePatch())
163
	if (IsFakePatch())
164
		return "";
164
		return "";
165
 
165
 
166
	Utils::String sDir = m_sDir.ToString();
166
	Utils::String sDir = _sDir;
167
 
167
 
168
	if ((m_iFileType == FILETYPE_MOD) && (sDir == "Patch"))
168
	if ((m_iFileType == FILETYPE_MOD) && (sDir == "Patch"))
169
		return "PluginManager/Patch";
169
		return "PluginManager/Patch";
170
 
170
 
171
	if ((!sDir.empty()) && (m_iFileType != FILETYPE_README) && sDir != ".")
171
	if ((!sDir.empty()) && (m_iFileType != FILETYPE_README) && sDir != ".")
Line 686... Line 686...
686
bool C_File::MatchFile ( C_File *file )
686
bool C_File::MatchFile ( C_File *file )
687
{
687
{
688
	if ( file->GetFileType() != m_iFileType )
688
	if ( file->GetFileType() != m_iFileType )
689
		return false;
689
		return false;
690
 
690
 
691
	if ( file->GetDir() != m_sDir )
691
	if ( file->dir() != _sDir )
692
		return false;
692
		return false;
693
 
693
 
694
	if ( file->name() != _sName )
694
	if ( file->name() != _sName )
695
	{
695
	{
696
		// check if the base name matches, but only for certain file extensions
696
		// check if the base name matches, but only for certain file extensions
Line 1733... Line 1733...
1733
	}
1733
	}
1734
 
1734
 
1735
	return iVersion;
1735
	return iVersion;
1736
}
1736
}
1737
 
1737
 
1738
CyString C_File::GetBaseName ()
1738
Utils::String C_File::baseName() const
1739
{
1739
{
1740
	// remove any directory
1740
	// remove any directory
1741
	Utils::String file = _sName.token("/", -1);
1741
	Utils::String file = _sName.token("/", -1);
1742
 
1742
 
1743
	// remove file extension
1743
	// remove file extension
1744
	return file.token(".", -1);
1744
	return file.remToken(".", -1);
-
 
1745
}
-
 
1746
CyString C_File::GetBaseName()
-
 
1747
{
-
 
1748
	return baseName();
1745
}
1749
}
1746
 
1750
 
1747
void C_File::CopyData(C_File *oldFile, bool includeData)
1751
void C_File::CopyData(C_File *oldFile, bool includeData)
1748
{
1752
{
1749
	SetFilename(oldFile->GetFullFilename());
1753
	SetFilename(oldFile->GetFullFilename());
1750
	m_sDir = oldFile->GetDir();
1754
	_sDir = oldFile->dir();
1751
	m_tTime = oldFile->GetCreationTime();
1755
	m_tTime = oldFile->GetCreationTime();
1752
	m_bShared = oldFile->IsShared();
1756
	m_bShared = oldFile->IsShared();
1753
	m_bSigned = oldFile->IsSigned();
1757
	m_bSigned = oldFile->IsSigned();
1754
	m_iFileType = oldFile->fileType();
1758
	m_iFileType = oldFile->fileType();
1755
	m_lSize = oldFile->GetSize();
1759
	m_lSize = oldFile->GetSize();