diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 2f307b43ea7853182f18f9452dca4b2cbc17a596..7d46ddf4178dab7687ef8692cbe5fa7c9788adc1 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1339,7 +1339,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry) if (version <= MAX_MESH_VERSION && offset >= 0 && size > 0) { //check cache for mesh skin info - LLFileSystem file(mesh_id, LLAssetType::AT_MESH); + LLFileSystem file(mesh_id, LLAssetType::AT_MESH, LLFileSystem::READ); if (file.getSize() >= offset+size) { U8* buffer = new(std::nothrow) U8[size]; @@ -1452,7 +1452,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) if (version <= MAX_MESH_VERSION && offset >= 0 && size > 0) { //check cache for mesh skin info - LLFileSystem file(mesh_id, LLAssetType::AT_MESH); + LLFileSystem file(mesh_id, LLAssetType::AT_MESH, LLFileSystem::READ); if (file.getSize() >= offset+size) { U8* buffer = new(std::nothrow) U8[size]; @@ -1551,7 +1551,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) if (version <= MAX_MESH_VERSION && offset >= 0 && size > 0) { //check cache for mesh physics shape info - LLFileSystem file(mesh_id, LLAssetType::AT_MESH); + LLFileSystem file(mesh_id, LLAssetType::AT_MESH, LLFileSystem::READ); if (file.getSize() >= offset+size) { LLMeshRepository::sCacheBytesRead += size; @@ -1656,7 +1656,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, bool c { //look for mesh in asset in cache - LLFileSystem file(mesh_params.getSculptID(), LLAssetType::AT_MESH); + LLFileSystem file(mesh_params.getSculptID(), LLAssetType::AT_MESH, LLFileSystem::READ); S32 size = file.getSize(); @@ -1740,7 +1740,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, { //check cache for mesh asset - LLFileSystem file(mesh_id, LLAssetType::AT_MESH); + LLFileSystem file(mesh_id, LLAssetType::AT_MESH, LLFileSystem::READ); if (file.getSize() >= offset+size) { U8* buffer = new(std::nothrow) U8[size]; @@ -3343,7 +3343,7 @@ void LLMeshLODHandler::processData(LLCore::BufferArray * /* body */, S32 /* body if (result == MESH_OK) { // good fetch from sim, write to cache - LLFileSystem file(mMeshParams.getSculptID(), LLAssetType::AT_MESH, LLFileSystem::WRITE); + LLFileSystem file(mMeshParams.getSculptID(), LLAssetType::AT_MESH, LLFileSystem::READ_WRITE); S32 offset = mOffset; S32 size = mRequestedBytes; @@ -3406,7 +3406,7 @@ void LLMeshSkinInfoHandler::processData(LLCore::BufferArray * /* body */, S32 /* && gMeshRepo.mThread->skinInfoReceived(mMeshID, data, data_size)) { // good fetch from sim, write to cache - LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::WRITE); + LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE); S32 offset = mOffset; S32 size = mRequestedBytes; @@ -3455,7 +3455,7 @@ void LLMeshDecompositionHandler::processData(LLCore::BufferArray * /* body */, S && gMeshRepo.mThread->decompositionReceived(mMeshID, data, data_size)) { // good fetch from sim, write to cache - LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::WRITE); + LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE); S32 offset = mOffset; S32 size = mRequestedBytes; @@ -3502,7 +3502,7 @@ void LLMeshPhysicsShapeHandler::processData(LLCore::BufferArray * /* body */, S3 && gMeshRepo.mThread->physicsShapeReceived(mMeshID, data, data_size) == MESH_OK) { // good fetch from sim, write to cache for caching - LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::WRITE); + LLFileSystem file(mMeshID, LLAssetType::AT_MESH, LLFileSystem::READ_WRITE); S32 offset = mOffset; S32 size = mRequestedBytes; diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index d847bd525f5b39bd53aad52e5f182414a505e70c..61078e821020d114c4d2b6edd74ff218eec56980 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -1147,7 +1147,7 @@ void LLPreviewGesture::saveIfNeeded() tid.generate(); assetId = tid.makeAssetID(gAgent.getSecureSessionID()); - LLFileSystem file(assetId, LLAssetType::AT_GESTURE, LLFileSystem::APPEND); + LLFileSystem file(assetId, LLAssetType::AT_GESTURE, LLFileSystem::WRITE); S32 size = dp.getCurrentSize(); file.write((U8*)buffer, size); diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 32932ea793382fc60d20be341f0d27c955b81d3e..79b979e53604e79f32e99d6233510050586d5897 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -595,7 +595,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync) tid.generate(); asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); - LLFileSystem file(asset_id, LLAssetType::AT_NOTECARD, LLFileSystem::APPEND); + LLFileSystem file(asset_id, LLAssetType::AT_NOTECARD, LLFileSystem::WRITE); LLSaveNotecardInfo* info = new LLSaveNotecardInfo(this, mItemUUID, mObjectUUID, diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 65539d30977ae7a5c0eddb6b30155a33417893f2..f50223ba11e622893d39e59afdbc3d69831cee9a 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -564,7 +564,7 @@ LLSD LLBufferedAssetUploadInfo::prepareUpload() if (getAssetId().isNull()) generateNewAssetId(); - LLFileSystem file(getAssetId(), getAssetType(), LLFileSystem::APPEND); + LLFileSystem file(getAssetId(), getAssetType(), LLFileSystem::WRITE); S32 size = mContents.length() + 1; file.write((U8*)mContents.c_str(), size);