summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorThomas Nelson <rider@lindenlab.com>2018-01-23 08:55:58 -0800
committerThomas Nelson <rider@lindenlab.com>2018-01-23 08:55:58 -0800
commit6489598d57571d5b984cb37eec4dd4421ce86c2a (patch)
tree87584ba45f81e0f6877f8eaafce53e821bf924a8 /indra/llcommon
parent1b8c2b5ebbe0d42f147730bc9b6528fa8c6796ce (diff)
parentd97d7c52068b71bd99b10db046c6a0688b61a254 (diff)
Merged lindenlab/viewer64 into default
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llfile.cpp9
-rw-r--r--indra/llcommon/llfile.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index 7b559861bb..8aa41035b9 100644
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -182,7 +182,14 @@ int LLFile::mkdir(const std::string& dirname, int perms)
int rc = ::mkdir(dirname.c_str(), (mode_t)perms);
#endif
// We often use mkdir() to ensure the existence of a directory that might
- // already exist. Don't spam the log if it does.
+ // already exist. There is no known case in which we want to call out as
+ // an error the requested directory already existing.
+ if (rc < 0 && errno == EEXIST)
+ {
+ // this is not the error you want, move along
+ return 0;
+ }
+ // anything else might be a problem
return warnif("mkdir", dirname, rc, EEXIST);
}
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 37eb75881c..ba935b8714 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -69,6 +69,7 @@ public:
// perms is a permissions mask like 0777 or 0700. In most cases it will
// be overridden by the user's umask. It is ignored on Windows.
+ // mkdir() considers "directory already exists" to be SUCCESS.
static int mkdir(const std::string& filename, int perms = 0700);
static int rmdir(const std::string& filename);