fix smpackage uninstall and install to different installation other than where tools.exe resides

This commit is contained in:
Chris Danford
2006-02-15 03:58:29 +00:00
parent 75bd3e55a7
commit 53e0ea8f24
6 changed files with 49 additions and 27 deletions
+17
View File
@@ -896,6 +896,23 @@ void GetDirListingRecursive( RageFileDriver *prfd, const RString &sDir, const RS
}
}
bool DeleteRecursive( RageFileDriver *prfd, const RString &sDir )
{
ASSERT( sDir.Right(1) == "/" );
vector<RString> vsFiles;
prfd->GetDirListing( sDir+"*", vsFiles, false, true );
FOREACH_CONST( RString, vsFiles, s )
{
if( IsADirectory(*s) )
DeleteRecursive( *s+"/" );
else
FILEMAN->Remove( *s );
}
return FILEMAN->Remove( sDir );
}
bool DeleteRecursive( const RString &sDir )
{
ASSERT( sDir.Right(1) == "/" );