diff options
Diffstat (limited to 'indra/llcommon/llfile.cpp')
-rw-r--r-- | indra/llcommon/llfile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index 9045324bf2..ed94ef21ef 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -293,7 +293,7 @@ int LLFile::rename(const std::string& filename, const std::string& newname, int return warnif(STRINGIZE("rename to '" << newname << "' from"), filename, rc, supress_error); } -bool LLFile::copy(const std::string from, const std::string to) +bool LLFile::copy(const std::string& from, const std::string& to) { bool copied = false; LLFILE* in = LLFile::fopen(from, "rb"); /* Flawfinder: ignore */ @@ -424,7 +424,7 @@ LLFILE * LLFile::_Fiopen(const std::string& filename, if (valid[n] == 0) return (0); // no valid mode - else if (norepflag && mode & (ios_base::out || ios_base::app) + else if (norepflag && mode & (ios_base::out | ios_base::app) && (fp = LLFile::fopen(filename, "r")) != 0) /* Flawfinder: ignore */ { // file must not exist, close and fail fclose(fp); |