diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2018-08-21 19:23:33 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2018-08-21 19:23:33 -0400 |
commit | db970c1a5f4737d1d6c7c6dbb50a16ec7592e6d6 (patch) | |
tree | 4246ba82a7610c808aaa65728fa45b2f6b9ef790 /indra | |
parent | 6a6114568687a67dc1e2de4fd1e8a3bed605c94d (diff) |
Don't compare rbegin() iterators, use LLStringUtil::endsWith().
I think the intention of (sDumpDir.rbegin() == mDirDelimiter.rbegin()) was to
test whether sDumpDir endsWith(mDirDelimiter). But those iterators will never
be equal. Instead, use LLStringUtil::endsWith().
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llvfs/lldir.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 2069888774..18836e54b0 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -42,6 +42,7 @@ #include "lldiriterator.h" #include "stringize.h" +#include "llstring.h" #include <boost/filesystem.hpp> #include <boost/foreach.hpp> #include <boost/range/begin.hpp> @@ -317,9 +318,9 @@ const std::string& LLDir::getChatLogsDir() const void LLDir::setDumpDir( const std::string& path ) { LLDir::sDumpDir = path; - if (! sDumpDir.empty() && sDumpDir.rbegin() == mDirDelimiter.rbegin() ) + if (LLStringUtil::endsWith(sDumpDir, mDirDelimiter)) { - sDumpDir.erase(sDumpDir.size() -1); + sDumpDir.erase(sDumpDir.size() - mDirDelimiter.size()); } } |