diff options
author | Oz Linden <oz@lindenlab.com> | 2015-02-27 09:03:04 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-02-27 09:03:04 -0500 |
commit | 83851db09ab0fecbb6722826055a55844fd98ea6 (patch) | |
tree | b3c73b1dec463e4d8a8a315f1d713a83e119d99b /indra/llappearance/llwearable.cpp | |
parent | bdb42b4c716a374ab7a7b54a630ed5b5a481cdb2 (diff) | |
parent | d4a2e9fd9a0e7001a6c824ddd6cf37039a632b9d (diff) |
merge up to 3.7.25-release
Diffstat (limited to 'indra/llappearance/llwearable.cpp')
-rwxr-xr-x | indra/llappearance/llwearable.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index 4bce3f99ed..41c06f4368 100755 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -86,10 +86,10 @@ LLAssetType::EType LLWearable::getAssetType() const return LLWearableType::getAssetType(mType); } -BOOL LLWearable::exportFile(LLFILE* fp) const +BOOL LLWearable::exportFile(const std::string& filename) const { - llofstream ofs(fp); - return exportStream(ofs); + llofstream ofs(filename, std::ios_base::out | std::ios_base::trunc | std::ios_base::binary); + return ofs.is_open() && exportStream(ofs); } // virtual @@ -201,10 +201,11 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp) } } -LLWearable::EImportResult LLWearable::importFile(LLFILE* fp, LLAvatarAppearance* avatarp ) +LLWearable::EImportResult LLWearable::importFile(const std::string& filename, + LLAvatarAppearance* avatarp ) { - llifstream ifs(fp); - return importStream(ifs, avatarp); + llifstream ifs(filename, std::ios_base::in | std::ios_base::binary); + return (! ifs.is_open())? FAILURE : importStream(ifs, avatarp); } // virtual |