diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-03-02 21:42:51 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-03-02 21:42:51 +0200 |
commit | be83a004db5831958837d9caa3bf7c98fedc3bf2 (patch) | |
tree | d88b90d8d0ab8d8e85bb8224db9c3a33b3f7ffa9 /indra/newview/llviewerassetupload.cpp | |
parent | fad8c596d44190facacb9e6cc608346ce4505a3d (diff) | |
parent | 2b385841f3031d599bdb226f0f859e51b09870f8 (diff) |
Merge branch 'master' into DRTVWR-522-maint
Diffstat (limited to 'indra/newview/llviewerassetupload.cpp')
-rw-r--r-- | indra/newview/llviewerassetupload.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 0df6811f6a..e15dbec769 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 "llvfile.h" +#include "llfilesystem.h" #include "llgesturemgr.h" #include "llpreviewnotecard.h" #include "llpreviewgesture.h" @@ -467,15 +467,13 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() setAssetType(assetType); - // copy this file into the vfs for upload + // copy this file into the cache for upload S32 file_size; LLAPRFile infile; infile.open(filename, LL_APR_RB, NULL, &file_size); if (infile.getFileHandle()) { - LLVFile file(gVFS, getAssetId(), assetType, LLVFile::WRITE); - - file.setMaxSize(file_size); + LLFileSystem file(getAssetId(), assetType, LLFileSystem::WRITE); const S32 buf_size = 65536; U8 copy_buf[buf_size]; @@ -507,7 +505,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLAssetType: mContents(buffer), mInvnFinishFn(finish), mTaskFinishFn(nullptr), - mStoredToVFS(false) + mStoredToCache(false) { setItemId(itemId); setAssetType(assetType); @@ -521,7 +519,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLPointer<LL mContents(), mInvnFinishFn(finish), mTaskFinishFn(nullptr), - mStoredToVFS(false) + mStoredToCache(false) { setItemId(itemId); @@ -555,7 +553,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID taskId, LLUUID itemI mContents(buffer), mInvnFinishFn(nullptr), mTaskFinishFn(finish), - mStoredToVFS(false) + mStoredToCache(false) { setItemId(itemId); setAssetType(assetType); @@ -566,13 +564,12 @@ LLSD LLBufferedAssetUploadInfo::prepareUpload() if (getAssetId().isNull()) generateNewAssetId(); - LLVFile file(gVFS, getAssetId(), getAssetType(), LLVFile::APPEND); + LLFileSystem file(getAssetId(), getAssetType(), LLFileSystem::APPEND); S32 size = mContents.length() + 1; - file.setMaxSize(size); file.write((U8*)mContents.c_str(), size); - mStoredToVFS = true; + mStoredToCache = true; return LLSD().with("success", LLSD::Boolean(true)); } @@ -595,10 +592,10 @@ LLUUID LLBufferedAssetUploadInfo::finishUpload(LLSD &result) LLUUID newAssetId = result["new_asset"].asUUID(); LLUUID itemId = getItemId(); - if (mStoredToVFS) + if (mStoredToCache) { LLAssetType::EType assetType(getAssetType()); - gVFS->renameFile(getAssetId(), assetType, newAssetId, assetType); + LLFileSystem::renameFile(getAssetId(), assetType, newAssetId, assetType); } if (mTaskUpload) |