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.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 7b5229d312..f2e887a678 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -45,7 +45,7 @@
#include "llviewerassetupload.h"
#include "llappviewer.h"
#include "llviewerstats.h"
-#include "llfilesystem.h"
+#include "llvfile.h"
#include "llgesturemgr.h"
#include "llpreviewnotecard.h"
#include "llpreviewgesture.h"
@@ -467,7 +467,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
setAssetType(assetType);
- // copy this file into the cache for upload
+ // copy this file into the vfs for upload
S32 file_size;
LLAPRFile infile;
infile.open(filename, LL_APR_RB, NULL, &file_size);
@@ -505,7 +505,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLAssetType:
mContents(buffer),
mInvnFinishFn(finish),
mTaskFinishFn(nullptr),
- mStoredToCache(false)
+ mStoredToVFS(false)
{
setItemId(itemId);
setAssetType(assetType);
@@ -519,7 +519,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLPointer<LL
mContents(),
mInvnFinishFn(finish),
mTaskFinishFn(nullptr),
- mStoredToCache(false)
+ mStoredToVFS(false)
{
setItemId(itemId);
@@ -553,7 +553,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID taskId, LLUUID itemI
mContents(buffer),
mInvnFinishFn(nullptr),
mTaskFinishFn(finish),
- mStoredToCache(false)
+ mStoredToVFS(false)
{
setItemId(itemId);
setAssetType(assetType);
@@ -564,12 +564,13 @@ LLSD LLBufferedAssetUploadInfo::prepareUpload()
if (getAssetId().isNull())
generateNewAssetId();
- LLFileSystem file(getAssetId(), getAssetType(), LLFileSystem::APPEND);
+ LLVFile file(gVFS, getAssetId(), getAssetType(), LLVFile::APPEND);
S32 size = mContents.length() + 1;
+ file.setMaxSize(size);
file.write((U8*)mContents.c_str(), size);
- mStoredToCache = true;
+ mStoredToVFS = true;
return LLSD().with("success", LLSD::Boolean(true));
}
@@ -592,10 +593,10 @@ LLUUID LLBufferedAssetUploadInfo::finishUpload(LLSD &result)
LLUUID newAssetId = result["new_asset"].asUUID();
LLUUID itemId = getItemId();
- if (mStoredToCache)
+ if (mStoredToVFS)
{
LLAssetType::EType assetType(getAssetType());
- LLFileSystem::renameFile(getAssetId(), assetType, newAssetId, assetType);
+ gVFS->renameFile(getAssetId(), assetType, newAssetId, assetType);
}
if (mTaskUpload)