diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2021-03-08 13:56:16 +0000 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2021-03-08 13:56:16 +0000 |
commit | c83e740ef94e16ba85574454f3138905edecb029 (patch) | |
tree | 6e10779ff7b2df5194a3df9d100ba28d53883166 /indra/newview/llpreviewnotecard.cpp | |
parent | 2b385841f3031d599bdb226f0f859e51b09870f8 (diff) |
Revert "Merge branch 'master' of https://bitbucket.org/lindenlab/viewer into DRTVWR-519"
This reverts commit e61f485a04dc8c8ac6bcf6a24848359092884d14, reversing
changes made to 00c47d079f7e958e473ed4083a7f7691fa02dcd5.
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
-rw-r--r-- | indra/newview/llpreviewnotecard.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index a7bb5c8236..1b60610668 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -46,7 +46,7 @@ #include "llselectmgr.h" #include "lltrans.h" #include "llviewertexteditor.h" -#include "llfilesystem.h" +#include "llvfile.h" #include "llviewerinventory.h" #include "llviewerobject.h" #include "llviewerobjectlist.h" @@ -327,7 +327,8 @@ void LLPreviewNotecard::loadAsset() } // static -void LLPreviewNotecard::onLoadComplete(const LLUUID& asset_uuid, +void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, + const LLUUID& asset_uuid, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status) { @@ -338,7 +339,7 @@ void LLPreviewNotecard::onLoadComplete(const LLUUID& asset_uuid, { if(0 == status) { - LLFileSystem file(asset_uuid, type, LLFileSystem::READ); + LLVFile file(vfs, asset_uuid, type, LLVFile::READ); S32 file_length = file.getSize(); @@ -445,7 +446,7 @@ void LLPreviewNotecard::finishInventoryUpload(LLUUID itemId, LLUUID newAssetId, LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(itemId)); if (nc) { - // *HACK: we have to delete the asset in the cache so + // *HACK: we have to delete the asset in the VFS so // that the viewer will redownload it. This is only // really necessary if the asset had to be modified by // the uploader, so this can be optimized away in some @@ -453,7 +454,7 @@ void LLPreviewNotecard::finishInventoryUpload(LLUUID itemId, LLUUID newAssetId, // script actually changed the asset. if (nc->hasEmbeddedInventory()) { - LLFileSystem::removeFile(newAssetId, LLAssetType::AT_NOTECARD); + gVFS->removeFile(newAssetId, LLAssetType::AT_NOTECARD); } if (newItemId.isNull()) { @@ -478,7 +479,7 @@ void LLPreviewNotecard::finishTaskUpload(LLUUID itemId, LLUUID newAssetId, LLUUI { if (nc->hasEmbeddedInventory()) { - LLFileSystem::removeFile(newAssetId, LLAssetType::AT_NOTECARD); + gVFS->removeFile(newAssetId, LLAssetType::AT_NOTECARD); } nc->setAssetId(newAssetId); nc->refreshFromInventory(); @@ -557,13 +558,14 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync) tid.generate(); asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); - LLFileSystem file(asset_id, LLAssetType::AT_NOTECARD, LLFileSystem::APPEND); + LLVFile file(gVFS, asset_id, LLAssetType::AT_NOTECARD, LLVFile::APPEND); LLSaveNotecardInfo* info = new LLSaveNotecardInfo(this, mItemUUID, mObjectUUID, tid, copyitem); S32 size = buffer.length() + 1; + file.setMaxSize(size); file.write((U8*)buffer.c_str(), size); gAssetStorage->storeAssetData(tid, LLAssetType::AT_NOTECARD, |