summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationstorage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnotificationstorage.cpp')
-rwxr-xr-xindra/newview/llnotificationstorage.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index e9970de58c..3418b33d37 100755
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -123,14 +123,18 @@ bool LLNotificationStorage::readNotifications(LLSD& pNotificationData, bool is_n
{
LLPointer<LLSDParser> parser = new LLSDXMLParser();
didFileRead = (parser->parse(notifyFile, pNotificationData, LLSDSerialize::SIZE_UNLIMITED) >= 0);
+ notifyFile.close();
+
if (!didFileRead)
{
LL_WARNS("LLNotificationStorage") << "Failed to parse open notifications from file '" << mFileName
- << "'" << LL_ENDL;
+ << "'" << LL_ENDL;
+ LLFile::remove(filename);
+ LL_WARNS("LLNotificationStorage") << "Removed invalid open notifications file '" << mFileName
+ << "'" << LL_ENDL;
}
}
-
- LL_INFOS("LLNotificationStorage") << "ending read '" << filename << "'" << LL_ENDL;
+
if (!didFileRead)
{
if(is_new_filename)