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 PUBLIC_KEY_FILE = "public.key";
|
||||||
const CString SCREENSHOTS_SUBDIR = "Screenshots/";
|
const CString SCREENSHOTS_SUBDIR = "Screenshots/";
|
||||||
const CString EDITS_SUBDIR = "Edits/";
|
const CString EDITS_SUBDIR = "Edits/";
|
||||||
|
const CString LASTGOOD_SUBDIR = "LastGood/";
|
||||||
|
|
||||||
class Style;
|
class Style;
|
||||||
|
|
||||||
|
|||||||
@@ -266,9 +266,17 @@ bool ProfileManager::DeleteLocalProfile( CString sProfileID )
|
|||||||
for( unsigned i=0; i<asFilesToDelete.size(); i++ )
|
for( unsigned i=0; i<asFilesToDelete.size(); i++ )
|
||||||
FILEMAN->Remove( asFilesToDelete[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
|
// remove edits dir
|
||||||
FILEMAN->Remove( sProfileDir + "/" + EDITS_SUBDIR );
|
FILEMAN->Remove( sProfileDir + "/" + EDITS_SUBDIR );
|
||||||
|
|
||||||
|
// remove lastgood dir
|
||||||
|
FILEMAN->Remove( sProfileDir + "/" + LASTGOOD_SUBDIR );
|
||||||
|
|
||||||
// remove profile dir
|
// remove profile dir
|
||||||
return FILEMAN->Remove( sProfileDir );
|
return FILEMAN->Remove( sProfileDir );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user