summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNicky Perian <nickyperian@yahoo.com>2012-03-26 21:29:01 -0500
committerNicky Perian <nickyperian@yahoo.com>2012-03-26 21:29:01 -0500
commit15d7da90c0d5868d8aa3732c704a41cc488c2791 (patch)
treead72c4ef83a67bf6102df832dc9897c78d087372 /indra/newview
parentf71ca079982e67713772b0500bbed876efb0c3e9 (diff)
OPEN-138 Intermittent write to character/new archetype.xml from Develop->Avatar->
Character Tests->Apperance To XML. Add explicit outfile.close() method before returning to caller. Add llinfos for file location as a troubleshooting aid.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoavatar.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index bc7f5a9744..f46cedfc4b 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7533,11 +7533,15 @@ void LLVOAvatar::dumpArchetypeXML( void* )
{
LLAPRFile outfile;
outfile.open(gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"new archetype.xml"), LL_APR_WB );
- apr_file_t* file = outfile.getFileHandle() ;
+ apr_file_t* file = outfile.getFileHandle();
if (!file)
{
return;
}
+ else
+ {
+ llinfos << "xmlfile write handle obtained : " << gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"new archetype.xml") << llendl;
+ }
apr_file_printf( file, "<?xml version=\"1.0\" encoding=\"US-ASCII\" standalone=\"yes\"?>\n" );
apr_file_printf( file, "<linden_genepool version=\"1.0\">\n" );
@@ -7577,6 +7581,11 @@ void LLVOAvatar::dumpArchetypeXML( void* )
}
apr_file_printf( file, "\t</archetype>\n" );
apr_file_printf( file, "\n</linden_genepool>\n" );
+ //explictly close the file if it is still open which it should be
+ if (file)
+ {
+ outfile.close();
+ }
}