Merge pull request #918 from bihailantian/patch-1

Update SFtpURecordHandler.java(fix SFTP断点续传上传文件错误)
master
lyy 3 years ago committed by GitHub
commit cba9483f3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      SFtpComponent/src/main/java/com/arialyy/aria/sftp/upload/SFtpURecordHandler.java

@ -63,14 +63,14 @@ final class SFtpURecordHandler extends RecordHandler {
+ ftpAttrs.getSize() + ftpAttrs.getSize()
+ "】" + "】"
+ "尝试从位置:" + "尝试从位置:"
+ (ftpAttrs.getSize() - 1) + ftpAttrs.getSize()
+ "开始上传"); + "开始上传");
getWrapper().setNewTask(false); getWrapper().setNewTask(false);
// 修改记录 // 修改记录
ThreadRecord threadRecord = record.threadRecords.get(0); ThreadRecord threadRecord = record.threadRecords.get(0);
//修改本地保存的停止地址为服务器上对应文件的大小 //修改本地保存的停止地址为服务器上对应文件的大小
threadRecord.startLocation = ftpAttrs.getSize() - 1; threadRecord.startLocation = ftpAttrs.getSize();
} }
} else { } else {
ALog.d(TAG, "SFTP服务器上不存在该文件"); ALog.d(TAG, "SFTP服务器上不存在该文件");

Loading…
Cancel
Save