aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLilly Zenovka2009-10-19 18:24:55 +0200
committerJacek Antonelli2009-11-27 18:13:07 -0600
commit857a84da3932cccfe0a0964c345b4b51363105c8 (patch)
tree56eb401f0890bb48d2f734f2beb0be55e60a759d
parentReverted "Updated primbackup from latest meerkat svn (r246)" (diff)
downloadmeta-impy-857a84da3932cccfe0a0964c345b4b51363105c8.zip
meta-impy-857a84da3932cccfe0a0964c345b4b51363105c8.tar.gz
meta-impy-857a84da3932cccfe0a0964c345b4b51363105c8.tar.bz2
meta-impy-857a84da3932cccfe0a0964c345b4b51363105c8.tar.xz
Port of objectbackup to 1.23 source tree: fixed LLAPRFile changes
Signed-off-by: Jacek Antonelli <jacek.antonelli@gmail.com>
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/primbackup.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/linden/indra/newview/primbackup.cpp b/linden/indra/newview/primbackup.cpp
index 8dbf1df..4e0e56f 100644
--- a/linden/indra/newview/primbackup.cpp
+++ b/linden/indra/newview/primbackup.cpp
@@ -1070,7 +1070,10 @@ void primbackup::upload_next_asset()
1070 uuid = tid.makeAssetID(gAgent.getSecureSessionID()); 1070 uuid = tid.makeAssetID(gAgent.getSecureSessionID());
1071 1071
1072 S32 file_size; 1072 S32 file_size;
1073 apr_file_t* fp = ll_apr_file_open(filename, LL_APR_RB, &file_size); 1073 apr_file_t* fp;
1074 LLAPRFile aFile;
1075 aFile.open(filename, LL_APR_RB, NULL, &file_size);
1076 fp = aFile.getFileHandle();
1074 if (fp) 1077 if (fp)
1075 { 1078 {
1076 const S32 buf_size = 65536; 1079 const S32 buf_size = 65536;
@@ -1078,11 +1081,11 @@ void primbackup::upload_next_asset()
1078 LLVFile file(gVFS, uuid, LLAssetType::AT_TEXTURE, LLVFile::WRITE); 1081 LLVFile file(gVFS, uuid, LLAssetType::AT_TEXTURE, LLVFile::WRITE);
1079 file.setMaxSize(file_size); 1082 file.setMaxSize(file_size);
1080 1083
1081 while ((file_size = ll_apr_file_read(fp, copy_buf, buf_size))) 1084 while ((file_size =aFile.read(copy_buf, buf_size)))
1082 { 1085 {
1083 file.write(copy_buf, file_size); 1086 file.write(copy_buf, file_size);
1084 } 1087 }
1085 apr_file_close(fp); 1088 aFile.close();
1086 } 1089 }
1087 else 1090 else
1088 { 1091 {