diff options
Diffstat (limited to 'indra/llcommon/llfile.cpp')
-rw-r--r-- | indra/llcommon/llfile.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index 289ce0bc2c..c32a776c3f 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -92,6 +92,17 @@ LLFILE* LLFile::_fsopen(const std::string& filename, const char* mode, int shari #endif } +int LLFile::close(LLFILE * file) +{ + int ret_value = 0; + if (file) + { + ret_value = fclose(file); + } + return ret_value; +} + + int LLFile::remove(const std::string& filename) { #if LL_WINDOWS @@ -318,7 +329,12 @@ void llofstream::close() if(is_open()) { if (_Filebuffer->close() == 0) + { _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/ + } + delete _Filebuffer; + _Filebuffer = NULL; + _ShouldClose = false; } } |