summaryrefslogtreecommitdiff
path: root/indra/newview/llwearablelist.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2012-09-20 04:29:17 +0000
committerDon Kjer <don@lindenlab.com>2012-09-20 04:29:17 +0000
commit7153d1db11c00245a379fa9601f092020152ea73 (patch)
tree816eb5f9d965379ebc2a4c4b030c2f9f97549726 /indra/newview/llwearablelist.cpp
parent7b75bd089834a84ab5062c96870edeee6fa22861 (diff)
Partial rewrite of llifstream and llofstream (Windows implementation pending). Moved more functionality from llviewerwearable to llwearable
Diffstat (limited to 'indra/newview/llwearablelist.cpp')
-rw-r--r--indra/newview/llwearablelist.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index 50beaaec3f..3dfacd70f3 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -112,15 +112,16 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
else if (status >= 0)
{
// read the file
- LLFILE* fp = LLFile::fopen(std::string(filename), "rb"); /*Flawfinder: ignore*/
- if( !fp )
+ llifstream ifs(filename, llifstream::binary);
+ if( !ifs.is_open() )
{
LL_WARNS("Wearable") << "Bad Wearable Asset: unable to open file: '" << filename << "'" << LL_ENDL;
}
else
{
wearable = new LLViewerWearable(uuid);
- LLWearable::EImportResult result = wearable->importFile( fp, avatarp );
+ LLWearable::EImportResult result = wearable->importStream(
+ ifs, avatarp );
if (LLWearable::SUCCESS != result)
{
if (wearable->getType() == LLWearableType::WT_COUNT)
@@ -131,7 +132,6 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
wearable = NULL;
}
- fclose( fp );
if(filename)
{
LLFile::remove(std::string(filename));