summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--[-rwxr-xr-x]indra/newview/llfloaterpreference.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 66066a45b2..c5c1e01538 100755..100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1500,7 +1500,7 @@ bool LLFloaterPreference::moveTranscriptsAndLog()
//Couldn't move the log and created a new directory so remove the new directory
if(madeDirectory)
{
- LLFile::remove(chatLogPath);
+ LLFile::rmdir(chatLogPath);
}
return false;
}
@@ -1526,7 +1526,7 @@ bool LLFloaterPreference::moveTranscriptsAndLog()
if(madeDirectory)
{
- LLFile::remove(chatLogPath);
+ LLFile::rmdir(chatLogPath);
}
return false;
@@ -2031,15 +2031,17 @@ void LLFloaterPreference::changed()
{
if (LLConversationLog::instance().getIsLoggingEnabled())
{
- getChild<LLButton>("clear_log")->setEnabled(LLConversationLog::instance().getConversations().size() > 0);
+ getChild<LLButton>("clear_log")->setEnabled(LLConversationLog::instance().getConversations().size() > 0);
}
else
{
// onClearLog clears list, then notifies changed() and only then clears file,
// so check presence of conversations before checking file, file will cleared later.
+ llstat st;
bool has_logs = LLConversationLog::instance().getConversations().size() > 0
- && LLFile::isfile(LLConversationLog::instance().getFileName())
- && LLFile::size(LLConversationLog::instance().getFileName()) > 0;
+ && LLFile::stat(LLConversationLog::instance().getFileName(), &st) == 0
+ && S_ISREG(st.st_mode)
+ && st.st_size > 0;
getChild<LLButton>("clear_log")->setEnabled(has_logs);
}