fix bug https://github.com/AriaLyy/Aria/issues/505 增加上传任务强制上传的功能
This commit is contained in:
@@ -74,7 +74,7 @@ public class FtpDirInfoThread extends AbsFtpInfoThread<DownloadGroupEntity, DGTa
|
||||
entity.setConvertFileSize(CommonUtil.formatFileSize(ftpFile.getSize()));
|
||||
entity.setFileSize(ftpFile.getSize());
|
||||
|
||||
//if(CheckUtil.checkAndHandlePathConflicts(mTaskWrapper.is))
|
||||
//if(CheckUtil.checkDownloadPathConflicts(mTaskWrapper.is))
|
||||
|
||||
entity.insert();
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class FtpRecordAdapter extends AbsRecordHandlerAdapter {
|
||||
if (record.isBlock) {
|
||||
helper.handleBlockRecord();
|
||||
} else {
|
||||
helper.handleMutilRecord();
|
||||
helper.handleMultiRecord();
|
||||
}
|
||||
} else if (record.threadNum == 1) {
|
||||
helper.handleSingleThreadRecord();
|
||||
@@ -77,9 +77,7 @@ public class FtpRecordAdapter extends AbsRecordHandlerAdapter {
|
||||
|
||||
int requestType = getWrapper().getRequestType();
|
||||
if (requestType == ITaskWrapper.D_FTP || requestType == ITaskWrapper.D_FTP_DIR) {
|
||||
record.isBlock = threadNum > 1 && Configuration.getInstance().downloadCfg.isUseBlock();
|
||||
// 线程数为1,或者使用了分块,则认为是使用动态长度文件
|
||||
record.isOpenDynamicFile = threadNum == 1 || record.isBlock;
|
||||
record.isBlock = Configuration.getInstance().downloadCfg.isUseBlock();
|
||||
} else {
|
||||
record.isBlock = false;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ final class FtpDThreadTaskAdapter extends BaseFtpThreadTaskAdapter {
|
||||
return;
|
||||
}
|
||||
|
||||
if (getThreadConfig().isOpenDynamicFile) {
|
||||
if (getThreadConfig().isBlock) {
|
||||
readDynamicFile(is);
|
||||
} else {
|
||||
readNormal(is);
|
||||
|
||||
Reference in New Issue
Block a user