FileCopy instead of Save

This commit is contained in:
Chris Danford
2004-10-06 08:54:37 +00:00
parent ebb9e730a4
commit e4cb07f1d5
3 changed files with 9 additions and 1 deletions
+6
View File
@@ -1576,6 +1576,12 @@ XNode* Profile::SaveCoinDataCreateNode() const
return pNode;
}
void Profile::BackupToDir( CString sFromDir, CString sToDir )
{
FileCopy( sFromDir+STATS_XML, sToDir+STATS_XML );
FileCopy( sFromDir+STATS_XML+SIGNATURE_APPEND, sToDir+STATS_XML+SIGNATURE_APPEND );
FileCopy( sFromDir+DONT_SHARE_SIG, sToDir+DONT_SHARE_SIG );
}
/*
* (c) 2001-2004 Chris Danford
+2
View File
@@ -289,6 +289,8 @@ public:
void SaveStatsWebPageToDir( CString sDir ) const;
void SaveMachinePublicKeyToDir( CString sDir ) const;
static void BackupToDir( CString sFromDir, CString sToDir );
private:
const HighScoresForASong *GetHighScoresForASong( const SongID& songID ) const;
const HighScoresForACourse *GetHighScoresForACourse( const CourseID& courseID ) const;
+1 -1
View File
@@ -92,7 +92,7 @@ bool ProfileManager::LoadProfile( PlayerNumber pn, CString sProfileDir, bool bIs
if( bSuccess )
{
CString sBackupDir = m_sProfileDir[pn] + "LastGood/";
m_Profile[pn].SaveStatsXmlToDir( sBackupDir, PREFSMAN->m_bSignProfileData );
Profile::BackupToDir( m_sProfileDir[pn], sBackupDir );
}
if( bIsMemCard )