Fix: Now we can delete profiles.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -266,9 +266,17 @@ bool ProfileManager::DeleteLocalProfile( CString sProfileID )
|
||||
for( unsigned i=0; i<asFilesToDelete.size(); i++ )
|
||||
FILEMAN->Remove( asFilesToDelete[i] );
|
||||
|
||||
// delete lastgood
|
||||
GetDirListing( sProfileDir + "/" + LASTGOOD_SUBDIR + "*", asFilesToDelete, false, true );
|
||||
for( unsigned i=0; i<asFilesToDelete.size(); i++ )
|
||||
FILEMAN->Remove( 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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user