diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/primbackup.cpp | 9 |
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 | { |