Skip to content

Commit 629a8ec

Browse files
author
yangsen
committed
fix get data empty and then exception
1 parent 890acf5 commit 629a8ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/src/main/java/com/qiniu/android/storage/UploadData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ long uploadSize() {
8989
void clearUploadState() {
9090
etag = null;
9191
md5 = null;
92-
state = State.WaitToUpload;
92+
state = State.NeedToCheck;
9393
}
9494

9595
void checkStateAndUpdate() {

library/src/main/java/com/qiniu/android/storage/UploadInfoV1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ private UploadBlock loadBlockData(UploadBlock block) throws IOException {
305305
// 已经加载过 block 数据
306306
// 没有需要上传的片 或者 有需要上传片但是已加载过片数据
307307
UploadData nextUploadData = block.nextUploadDataWithoutCheckData();
308-
if (nextUploadData.getState() == UploadData.State.WaitToUpload) {
308+
if (nextUploadData.getState() == UploadData.State.WaitToUpload && nextUploadData.data != null) {
309309
return block;
310310
}
311311

0 commit comments

Comments
 (0)