summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerassetupload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerassetupload.cpp')
-rw-r--r--indra/newview/llviewerassetupload.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 078db565f5..daf635cc57 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -62,7 +62,8 @@ LLResourceUploadInfo::LLResourceUploadInfo(LLTransactionID transactId,
LLAssetType::EType assetType, std::string name, std::string description,
S32 compressionInfo, LLFolderType::EType destinationType,
LLInventoryType::EType inventoryType, U32 nextOWnerPerms,
- U32 groupPerms, U32 everyonePerms, S32 expectedCost, bool showInventory) :
+ U32 groupPerms, U32 everyonePerms, S32 expectedCost,
+ const LLUUID& destFolderId, bool showInventory) :
mTransactionId(transactId),
mAssetType(assetType),
mName(name),
@@ -75,7 +76,7 @@ LLResourceUploadInfo::LLResourceUploadInfo(LLTransactionID transactId,
mEveryonePerms(everyonePerms),
mExpectedUploadCost(expectedCost),
mShowInventory(showInventory),
- mFolderId(LLUUID::null),
+ mFolderId(destFolderId),
mItemId(LLUUID::null),
mAssetId(LLAssetID::null)
{ }
@@ -84,7 +85,8 @@ LLResourceUploadInfo::LLResourceUploadInfo(LLTransactionID transactId,
LLResourceUploadInfo::LLResourceUploadInfo(std::string name,
std::string description, S32 compressionInfo,
LLFolderType::EType destinationType, LLInventoryType::EType inventoryType,
- U32 nextOWnerPerms, U32 groupPerms, U32 everyonePerms, S32 expectedCost, bool showInventory) :
+ U32 nextOWnerPerms, U32 groupPerms, U32 everyonePerms, S32 expectedCost,
+ const LLUUID& destFolderId, bool showInventory) :
mName(name),
mDescription(description),
mCompressionInfo(compressionInfo),
@@ -97,7 +99,7 @@ LLResourceUploadInfo::LLResourceUploadInfo(std::string name,
mShowInventory(showInventory),
mTransactionId(),
mAssetType(LLAssetType::AT_NONE),
- mFolderId(LLUUID::null),
+ mFolderId(destFolderId),
mItemId(LLUUID::null),
mAssetId(LLAssetID::null)
{
@@ -299,9 +301,12 @@ void LLResourceUploadInfo::assignDefaults()
mDescription = "(No Description)";
}
- mFolderId = gInventory.findUserDefinedCategoryUUIDForType(
- (mDestinationFolderType == LLFolderType::FT_NONE) ?
- (LLFolderType::EType)mAssetType : mDestinationFolderType);
+ if (mFolderId.isNull())
+ {
+ mFolderId = gInventory.findUserDefinedCategoryUUIDForType(
+ (mDestinationFolderType == LLFolderType::FT_NONE) ?
+ (LLFolderType::EType)mAssetType : mDestinationFolderType);
+ }
}
std::string LLResourceUploadInfo::getDisplayName() const
@@ -358,10 +363,12 @@ LLNewFileResourceUploadInfo::LLNewFileResourceUploadInfo(
U32 groupPerms,
U32 everyonePerms,
S32 expectedCost,
+ const LLUUID& destFolderId,
bool show_inventory) :
LLResourceUploadInfo(name, description, compressionInfo,
destinationType, inventoryType,
- nextOWnerPerms, groupPerms, everyonePerms, expectedCost, show_inventory),
+ nextOWnerPerms, groupPerms, everyonePerms, expectedCost,
+ destFolderId, show_inventory),
mFileName(fileName)
{
}
@@ -566,12 +573,13 @@ LLNewBufferedResourceUploadInfo::LLNewBufferedResourceUploadInfo(
U32 groupPerms,
U32 everyonePerms,
S32 expectedCost,
+ const LLUUID& destFolderId,
bool show_inventory,
uploadFinish_f finish,
uploadFailure_f failure)
: LLResourceUploadInfo(name, description, compressionInfo,
destinationType, inventoryType,
- nextOWnerPerms, groupPerms, everyonePerms, expectedCost, show_inventory)
+ nextOWnerPerms, groupPerms, everyonePerms, expectedCost, destFolderId, show_inventory)
, mBuffer(buffer)
, mFinishFn(finish)
, mFailureFn(failure)