summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorKelly Washington <kelly@lindenlab.com>2007-03-05 22:09:52 +0000
committerKelly Washington <kelly@lindenlab.com>2007-03-05 22:09:52 +0000
commit1d18eb043ab71998bded6931e181e53cbb9bf386 (patch)
tree9e9ff5187b960fd77b95d69bcbebabfe9bb9aa40 /indra/llcommon
parent437882ca3ba259911d02889621afa334ae1c76db (diff)
merge -r57991:58444 branches/distribute/user/mute to release
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llerror.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index bbff363f54..9d60dde672 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -988,15 +988,26 @@ namespace LLError
return std::string(s, where + p.size());
}
+ void replaceChar(std::string& s, char old, char replacement)
+ {
+ std::string::size_type i = 0;
+ std::string::size_type len = s.length();
+ for ( ; i < len; i++ )
+ {
+ if (s[i] == old)
+ {
+ s[i] = replacement;
+ }
+ }
+ }
+
std::string abbreviateFile(const std::string& filePath)
{
std::string f = filePath;
-
#if LL_WINDOWS
- static std::string indra_prefix = "indra\\";
-#else
- static std::string indra_prefix = "indra/";
+ replaceChar(f, '\\', '/');
#endif
+ static std::string indra_prefix = "indra/";
f = removePrefix(f, indra_prefix);
#if LL_DARWIN