summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwearable.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-12-05 15:20:27 -0500
committerOz Linden <oz@lindenlab.com>2016-12-05 15:20:27 -0500
commitc21571474c0022f83a4efc28d59e97fc020fd0e7 (patch)
tree15586cbd2055a1c84dad4ce2f74efe1a885d997d /indra/newview/llviewerwearable.cpp
parentfd2ccb16068dfd21307b17e78e384d8ae19fef12 (diff)
parent68413474c4479eee9bdbeb34ea131475ba1d646e (diff)
merge changes for 5.0.0-release
Diffstat (limited to 'indra/newview/llviewerwearable.cpp')
-rw-r--r--indra/newview/llviewerwearable.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index 88eb13e7cd..ae9ce37a28 100644
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -70,7 +70,7 @@ private:
};
// Private local functions
-static std::string asset_id_to_filename(const LLUUID &asset_id);
+static std::string asset_id_to_filename(const LLUUID &asset_id, const ELLPath dir_spec);
LLViewerWearable::LLViewerWearable(const LLTransactionID& transaction_id) :
LLWearable(),
@@ -513,7 +513,7 @@ void LLViewerWearable::saveNewAsset() const
// LL_INFOS() << "LLViewerWearable::saveNewAsset() type: " << getTypeName() << LL_ENDL;
//LL_INFOS() << *this << LL_ENDL;
- const std::string filename = asset_id_to_filename(mAssetID);
+ const std::string filename = asset_id_to_filename(mAssetID, LL_PATH_CACHE);
if(! exportFile(filename))
{
std::string buffer = llformat("Unable to save '%s' to wearable file.", mName.c_str());
@@ -525,6 +525,12 @@ void LLViewerWearable::saveNewAsset() const
return;
}
+ if (gSavedSettings.getBOOL("LogWearableAssetSave"))
+ {
+ const std::string log_filename = asset_id_to_filename(mAssetID, LL_PATH_LOGS);
+ exportFile(log_filename);
+ }
+
// save it out to database
if( gAssetStorage )
{
@@ -573,7 +579,7 @@ void LLViewerWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void*
}
// Delete temp file
- const std::string src_filename = asset_id_to_filename(new_asset_id);
+ const std::string src_filename = asset_id_to_filename(new_asset_id, LL_PATH_CACHE);
LLFile::remove(src_filename);
// delete the context data
@@ -610,10 +616,10 @@ std::ostream& operator<<(std::ostream &s, const LLViewerWearable &w)
return s;
}
-std::string asset_id_to_filename(const LLUUID &asset_id)
+std::string asset_id_to_filename(const LLUUID &asset_id, const ELLPath dir_spec)
{
std::string asset_id_string;
asset_id.toString(asset_id_string);
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,asset_id_string) + ".wbl";
+ std::string filename = gDirUtilp->getExpandedFilename(dir_spec,asset_id_string) + ".wbl";
return filename;
}