summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewnotecard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
-rw-r--r--indra/newview/llpreviewnotecard.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 230def5362..59be35fe92 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"
@@ -352,7 +352,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)
{
@@ -363,7 +364,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();
@@ -470,7 +471,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
@@ -478,7 +479,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())
{
@@ -503,7 +504,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();
@@ -582,13 +583,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,