summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-xindra/llcommon/llfile.cpp6
-rwxr-xr-xindra/llcommon/llfile.h55
2 files changed, 31 insertions, 30 deletions
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index cb3357419a..0751bde07c 100755
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -332,13 +332,13 @@ inline DWORD decode_open_create_flags(std::ios_base::openmode omode)
{
if (!(omode & LLFile::out))
{
- return TRUNCATE_EXISTING; // open and truncatte if it exists, otherwise fail
+ return TRUNCATE_EXISTING; // open and truncate if it exists, otherwise fail
}
return CREATE_ALWAYS; // open and truncate if it exists, otherwise create it
}
if (!(omode & LLFile::out))
{
- return OPEN_EXISTING; // open if exists, otherwise fail
+ return OPEN_EXISTING; // open if it exists, otherwise fail
}
// LLFile::app or (LLFile::out and (!LLFile::trunc or !LLFile::noreplace))
return OPEN_ALWAYS; // open if it exists, otherwise create it
@@ -738,7 +738,7 @@ int LLFile::lock(int mode, std::error_code& ec)
{
flags |= LOCKFILE_EXCLUSIVE_LOCK;
}
- // We lock the maximum range, since flock only supports locking the entire file too
+ // We lock the maximum range, since flock only supports locking the entire file too
if (LockFileEx(mHandle, flags, 0, MAXDWORD, MAXDWORD, &overlapped))
{
return clear_error(ec);
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index ae8e755fe7..f48b0f5cad 100755
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -77,30 +77,30 @@ public:
any other combinations than listed here are not allowed and will cause an error
- bin in out trunc app norep File exists File does not exist
- -------------------------------------------------------------------------------
- - + - - - - Open at begin Failure to open
- + + - - - - " "
- - - + - - - " Create new
- + - + - - - " "
- - + + - - - " "
- + + + - - - " "
- -------------------------------------------------------------------------------
- - - + + - - Destroy contents Create new
- + - + + - - " "
- - + + + - - " "
- + + + + - - " "
- -------------------------------------------------------------------------------
- - - + x - + Failure to open Create new
- + - + x - + " "
- - + + x - + " "
- + + + x - + " "
- -------------------------------------------------------------------------------
- - - + - + - Write to end Create new
- + - + - + - " "
- - + + - + - " "
- + + + - + - " "
- -------------------------------------------------------------------------------
+ bin in out trunc app noreplace File exists File doesn't exist
+ ----------------------------------------------------------------------------------
+ - + - - - - Open at begin Failure to open
+ + + - - - - " "
+ - - + - - - " Create new
+ + - + - - - " "
+ - + + - - - " "
+ + + + - - - " "
+ ----------------------------------------------------------------------------------
+ - - + + - - Destroy contents Create new
+ + - + + - - " "
+ - + + + - - " "
+ + + + + - - " "
+ ----------------------------------------------------------------------------------
+ - - + x - + Failure to open Create new
+ + - + x - + " "
+ - + + x - + " "
+ + + + x - + " "
+ ----------------------------------------------------------------------------------
+ - - + - + - Write to end Create new
+ + - + - + - " "
+ - + + - + - " "
+ + + + - + - " "
+ ----------------------------------------------------------------------------------
*/
static const std::ios_base::openmode app = 1 << 1; // append to end
static const std::ios_base::openmode ate = 1 << 2; // initialize to end
@@ -241,7 +241,7 @@ public:
/// otherwise the function will block until the lock can be acquired.
/// @returns 0 on success, -1 on failure
- /// close the file explicitely
+ /// close the file explicitly
int close(std::error_code& ec);
///< @returns 0 on success, -1 on failure
@@ -297,8 +297,9 @@ public:
/// remove a file or directory
static int remove(const std::string& filename, int suppress_warning = 0);
- ///< pass ENOENT in the optional 'suppress_warning' parameter if you don't want
- /// a warning in the log when the directory does not exist
+ ///< pass an errno value (e.g., ENOENT) in the optional 'suppress_warning' parameter if you want to
+ /// suppress a warning in the log when the failure matches that errno (e.g., suppress warning if
+ /// the file or directory does not exist)
/// @returns 0 on success and -1 on failure.
/// rename a file