Prevent leaking compilation path to log file

The current code leaks the build path of the machine the game is compiled on
This commit is contained in:
sukibaby
2025-01-03 11:47:35 -08:00
committed by teejusb
parent f57c71bd23
commit d837599530
+4 -4
View File
@@ -165,24 +165,23 @@ bool RageFileDriverDirect::Remove( const RString &sPath_ )
RString sPath = sPath_;
FDB->ResolvePath( sPath );
RageFileManager::FileType type = this->GetFileType(sPath);
switch( type )
{
case RageFileManager::TYPE_FILE:
TRACE( ssprintf("remove '%s'", (m_sRoot + sPath).c_str()) );
if( DoRemove(m_sRoot + sPath) == -1 )
{
WARN( ssprintf("remove(%s) failed: %s", (m_sRoot + sPath).c_str(), strerror(errno)) );
WARN("remove failed: " + sPath);
return false;
}
FDB->DelFile( sPath );
return true;
case RageFileManager::TYPE_DIR:
TRACE( ssprintf("rmdir '%s'", (m_sRoot + sPath).c_str()) );
if( DoRmdir(m_sRoot + sPath) == -1 )
{
WARN( ssprintf("rmdir(%s) failed: %s", (m_sRoot + sPath).c_str(), strerror(errno)) );
WARN("rmdir failed: " + sPath);
return false;
}
FDB->DelFile( sPath );
@@ -193,6 +192,7 @@ bool RageFileDriverDirect::Remove( const RString &sPath_ )
default:
FAIL_M(ssprintf("Invalid FileType: %i", type));
return false;
}
}