diff options
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
| -rw-r--r-- | indra/newview/llviewermenufile.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 801ff3c212..772abb0373 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -530,7 +530,7 @@ void upload_single_file( return; } -void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) +void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLUUID& dest) { for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) { @@ -642,7 +642,7 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE); fmt_file.write(formatted->getData(), formatted->getDataSize()); - LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared<LLResourceUploadInfo>( tid, LLAssetType::AT_TEXTURE, asset_name, asset_name, 0, @@ -650,15 +650,16 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), - LLAgentBenefitsMgr::current().getTextureUploadCost(raw_image->getWidth(), raw_image->getHeight()) - )); + LLAgentBenefitsMgr::current().getTextureUploadCost(raw_image->getWidth(), raw_image->getHeight()), + dest + ); upload_new_resource(assetUploadInfo); } } else { - LLNewFileResourceUploadInfo* info_p = new LLNewFileResourceUploadInfo( + LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared<LLNewFileResourceUploadInfo>( filename, asset_name, asset_name, 0, @@ -666,8 +667,8 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), - expected_upload_cost); - LLResourceUploadInfo::ptr_t uploadInfo(info_p); + expected_upload_cost, + dest); upload_new_resource(uploadInfo); } @@ -687,14 +688,14 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) // Todo: // 1. Decouple bulk upload from material editor // 2. Take into account possiblity of identical textures - LLMaterialEditor::uploadMaterialFromModel(filename, model, i); + LLMaterialEditor::uploadMaterialFromModel(filename, model, i, dest); } } } } } -void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response) +void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response, const LLUUID& dest) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) @@ -703,7 +704,7 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLS return; } - do_bulk_upload(filenames, allow_2k); + do_bulk_upload(filenames, allow_2k, dest); } bool get_bulk_upload_expected_cost( |
