diff options
author | Callum Prentice <callum@lindenlab.com> | 2021-03-09 14:39:51 -0800 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2021-03-09 14:39:51 -0800 |
commit | 168d177197bd7558bbe0ca13d01c984ad8638da7 (patch) | |
tree | 60b01576041b1d1e336fef9c4944570c2c4dfcc4 /indra/newview/llviewerassetupload.cpp | |
parent | 519cbcecdf78e4dfc3adc465ae8cebed5df71647 (diff) |
This set of changes reverts the merge with master (git revert c83e740) and results in a version of the DRTVWR-519 that matches what was presemt before it was deployed as a release viewer *plus* 3 small fixes from Maxim (See commits). This branch can now be used for additional fixes before eventually being used to release D-519 as normal
Diffstat (limited to 'indra/newview/llviewerassetupload.cpp')
-rw-r--r-- | indra/newview/llviewerassetupload.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index f2e887a678..7b5229d312 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,7 +467,7 @@ 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); @@ -505,7 +505,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLAssetType: mContents(buffer), mInvnFinishFn(finish), mTaskFinishFn(nullptr), - mStoredToVFS(false) + mStoredToCache(false) { setItemId(itemId); setAssetType(assetType); @@ -519,7 +519,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLPointer<LL mContents(), mInvnFinishFn(finish), mTaskFinishFn(nullptr), - mStoredToVFS(false) + mStoredToCache(false) { setItemId(itemId); @@ -553,7 +553,7 @@ LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID taskId, LLUUID itemI mContents(buffer), mInvnFinishFn(nullptr), mTaskFinishFn(finish), - mStoredToVFS(false) + mStoredToCache(false) { setItemId(itemId); setAssetType(assetType); @@ -564,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)); } @@ -593,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) |