LLAPRFile cleaned up

This commit is contained in:
Shyotl
2011-09-20 21:39:27 -05:00
parent 0ace809572
commit d917bf6b06
19 changed files with 126 additions and 215 deletions

View File

@@ -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;