Fix two small RageFile bugs

1) RageFileDriverDirect was failing to assign m_sRoot

2) Improve check if m_sRoot is empty

3) Fix a semi-broken logging method in RageFileManager
This commit is contained in:
sukibaby
2024-07-21 06:24:47 -07:00
committed by teejusb
parent e60cf2aa0d
commit 5d2667add1
2 changed files with 6 additions and 9 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ static struct FileDriverEntry_DIRRO: public FileDriverEntry
} const g_RegisterDriver2;
RageFileDriverDirect::RageFileDriverDirect( const RString &sRoot ):
RageFileDriver( new DirectFilenameDB(sRoot) )
RageFileDriver( new DirectFilenameDB(sRoot) ), m_sRoot(sRoot)
{
Remount( sRoot );
}
@@ -158,7 +158,7 @@ bool RageFileDriverDirect::Move( const RString &sOldPath_, const RString &sNewPa
bool RageFileDriverDirect::Remove( const RString &sPath_ )
{
if( m_sRoot == "(empty)" )
if( m_sRoot.empty() || m_sRoot == "(empty)")
{
return false;
}