From 54294664f9bdfdf3bbab00080e974a88e30f5764 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 24 Aug 2013 19:22:06 +0200 Subject: [PATCH] Make less calls to LLFile::isFile. --- indra/llcommon/nd/ndfile.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/indra/llcommon/nd/ndfile.cpp b/indra/llcommon/nd/ndfile.cpp index 6a8a45afb3..23a51eab23 100644 --- a/indra/llcommon/nd/ndfile.cpp +++ b/indra/llcommon/nd/ndfile.cpp @@ -288,11 +288,10 @@ namespace nd bool isBinary = (aFlags & APR_BINARY); bool doCreate = (aFlags & APR_CREATE); bool doTruncate = (aFlags & APR_TRUNCATE); - bool doesExist = LLFile::isfile( aFilename ); if( aFlags & APR_READ && aFlags & APR_WRITE ) { - if( doTruncate || !doesExist ) + if( doTruncate || !LLFile::isfile( aFilename ) ) { if( isBinary ) return openWBP; @@ -318,7 +317,7 @@ namespace nd if( aFlags & APR_WRITE ) { - if( ( doesExist && !doTruncate ) || !doCreate ) + if( ( !doTruncate && LLFile::isfile( aFilename ) ) || !doCreate ) { if( isBinary ) return openRBP;