LLAPRFile cleaned up
This commit is contained in:
@@ -184,8 +184,7 @@ bool LLLFSThread::Request::processRequest()
|
||||
if (mOperation == FILE_READ)
|
||||
{
|
||||
llassert(mOffset >= 0);
|
||||
LLAPRFile infile ; // auto-closes
|
||||
infile.open(mFileName, LL_APR_RB, LLAPRFile::local);
|
||||
LLAPRFile infile(mFileName, LL_APR_RB);
|
||||
if (!infile.getFileHandle())
|
||||
{
|
||||
llwarns << "LLLFS: Unable to read file: " << mFileName << llendl;
|
||||
@@ -207,8 +206,7 @@ bool LLLFSThread::Request::processRequest()
|
||||
apr_int32_t flags = APR_CREATE|APR_WRITE|APR_BINARY;
|
||||
if (mOffset < 0)
|
||||
flags |= APR_APPEND;
|
||||
LLAPRFile outfile ;
|
||||
outfile.open(mFileName, flags, LLAPRFile::local);
|
||||
LLAPRFile outfile(mFileName, flags);
|
||||
if (!outfile.getFileHandle())
|
||||
{
|
||||
llwarns << "LLLFS: Unable to write file: " << mFileName << llendl;
|
||||
|
||||
Reference in New Issue
Block a user