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:
@@ -165,24 +165,23 @@ bool RageFileDriverDirect::Remove( const RString &sPath_ )
|
|||||||
|
|
||||||
RString sPath = sPath_;
|
RString sPath = sPath_;
|
||||||
FDB->ResolvePath( sPath );
|
FDB->ResolvePath( sPath );
|
||||||
|
|
||||||
RageFileManager::FileType type = this->GetFileType(sPath);
|
RageFileManager::FileType type = this->GetFileType(sPath);
|
||||||
switch( type )
|
switch( type )
|
||||||
{
|
{
|
||||||
case RageFileManager::TYPE_FILE:
|
case RageFileManager::TYPE_FILE:
|
||||||
TRACE( ssprintf("remove '%s'", (m_sRoot + sPath).c_str()) );
|
|
||||||
if( DoRemove(m_sRoot + sPath) == -1 )
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
FDB->DelFile( sPath );
|
FDB->DelFile( sPath );
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case RageFileManager::TYPE_DIR:
|
case RageFileManager::TYPE_DIR:
|
||||||
TRACE( ssprintf("rmdir '%s'", (m_sRoot + sPath).c_str()) );
|
|
||||||
if( DoRmdir(m_sRoot + sPath) == -1 )
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
FDB->DelFile( sPath );
|
FDB->DelFile( sPath );
|
||||||
@@ -193,6 +192,7 @@ bool RageFileDriverDirect::Remove( const RString &sPath_ )
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
FAIL_M(ssprintf("Invalid FileType: %i", type));
|
FAIL_M(ssprintf("Invalid FileType: %i", type));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user