diff options
| author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-02-22 18:53:40 -0800 |
|---|---|---|
| committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-02-22 18:53:40 -0800 |
| commit | 05f4e8a10517b3b341359a210aeb0af06c44d43a (patch) | |
| tree | 02c8a03fbf7fa12fc454c7afe2831fb6339012df /indra/newview/llconversationlog.cpp | |
| parent | 1d1791fa11f3c57191a9f21a89501e747f316135 (diff) | |
CHUI-778 (Saving preferences updates text in all open message panels in conversation floater to show as old messages) Now changing the log/transcripts file location actually moves the files to the new location. Prior behavior just started a new history at that location. Also a fix was made so that if the user changed the log/transcripts path then after pressing the Preferences 'OK' button the new location will be saved to the corresponding .xml file.
Diffstat (limited to 'indra/newview/llconversationlog.cpp')
| -rw-r--r-- | indra/newview/llconversationlog.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index fc3bc8551c..88671a789f 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -376,6 +376,27 @@ void LLConversationLog::cache() } } +bool LLConversationLog::moveLog(const std::string &originDirectory, const std::string &targetDirectory) +{ + //Does the file exist in the current path + if(LLFile::isfile(originDirectory)) + { + //Does same file exist in the destination path, if so try to remove it + if(LLFile::isfile(targetDirectory)) + { + LLFile::remove(targetDirectory); + } + + //Move the file from the current path to destination path + if(LLFile::rename(originDirectory, targetDirectory) != 0) + { + return false; + } + } + + return true; +} + std::string LLConversationLog::getFileName() { std::string filename = "conversation"; |
