The file drivers are one of the few things that can be accessed before LOG is set up, guard all accesses.
This commit is contained in:
@@ -49,6 +49,8 @@
|
||||
#include "RageLog.h"
|
||||
#include <errno.h>
|
||||
|
||||
#define Warn(args...) if( LOG ) LOG->Warn( args ); else fprintf( stderr, args )
|
||||
|
||||
enum ThreadRequest
|
||||
{
|
||||
REQ_OPEN,
|
||||
@@ -157,7 +159,7 @@ ThreadedFileWorker::ThreadedFileWorker( RString sPath ):
|
||||
/* Grab a reference to the child driver. We'll operate on it directly. */
|
||||
m_pChildDriver = FILEMAN->GetFileDriver( sPath );
|
||||
if( m_pChildDriver == NULL )
|
||||
LOG->Warn( "ThreadedFileWorker: Mountpoint \"%s\" not found", sPath.c_str() );
|
||||
Warn( "ThreadedFileWorker: Mountpoint \"%s\" not found", sPath.c_str() );
|
||||
|
||||
m_pResultFile = NULL;
|
||||
m_pRequestFile = NULL;
|
||||
@@ -862,7 +864,7 @@ bool RageFileDriverTimeout::Move( const RString &sOldPath, const RString &sNewPa
|
||||
int iRet = m_pWorker->Move( sOldPath, sNewPath );
|
||||
if( iRet == -1 )
|
||||
{
|
||||
LOG->Warn( "RageFileDriverTimeout::Move(%s,%s) failed", sOldPath.c_str(), sNewPath.c_str() );
|
||||
Warn( "RageFileDriverTimeout::Move(%s,%s) failed", sOldPath.c_str(), sNewPath.c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -874,7 +876,7 @@ bool RageFileDriverTimeout::Remove( const RString &sPath )
|
||||
int iRet = m_pWorker->Remove( sPath );
|
||||
if( iRet == -1 )
|
||||
{
|
||||
LOG->Warn( "RageFileDriverTimeout::Remove(%s) failed", sPath.c_str() );
|
||||
Warn( "RageFileDriverTimeout::Remove(%s) failed", sPath.c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user