From ae2f55c7acb128fa006f9f9ab1628d46165b579c Mon Sep 17 00:00:00 2001 From: Charles Lohr Date: Tue, 25 Jan 2005 06:21:39 +0000 Subject: [PATCH] Fix: Now we can delete profiles. --- stepmania/src/Profile.h | 1 + stepmania/src/ProfileManager.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/stepmania/src/Profile.h b/stepmania/src/Profile.h index 334bbdbc31..c30847d33f 100644 --- a/stepmania/src/Profile.h +++ b/stepmania/src/Profile.h @@ -40,6 +40,7 @@ const CString DONT_SHARE_SIG = "DontShare.sig"; const CString PUBLIC_KEY_FILE = "public.key"; const CString SCREENSHOTS_SUBDIR = "Screenshots/"; const CString EDITS_SUBDIR = "Edits/"; +const CString LASTGOOD_SUBDIR = "LastGood/"; class Style; diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index ebedc49765..6250d675eb 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -266,9 +266,17 @@ bool ProfileManager::DeleteLocalProfile( CString sProfileID ) for( unsigned i=0; iRemove( asFilesToDelete[i] ); + // delete lastgood + GetDirListing( sProfileDir + "/" + LASTGOOD_SUBDIR + "*", asFilesToDelete, false, true ); + for( unsigned i=0; iRemove( asFilesToDelete[i] ); + // remove edits dir FILEMAN->Remove( sProfileDir + "/" + EDITS_SUBDIR ); + // remove lastgood dir + FILEMAN->Remove( sProfileDir + "/" + LASTGOOD_SUBDIR ); + // remove profile dir return FILEMAN->Remove( sProfileDir ); }