This commit is contained in:
laoyuyu
2019-11-19 20:03:25 +08:00
parent 846e6c0720
commit 1b54bfc4ac
15 changed files with 202 additions and 119 deletions

View File

@@ -170,9 +170,8 @@ public class CheckDGEntityUtil implements ICheckEntityUtil {
if (!newName.equals(entity.getFileName())) {
String oldPath = mEntity.getDirPath() + "/" + entity.getFileName();
String newPath = mEntity.getDirPath() + "/" + newName;
if (DbEntity.checkDataExist(DownloadEntity.class, "downloadPath=? or isComplete='true'",
newPath)) {
ALog.w(TAG, String.format("更新文件名失败,路径【%s】已存在或文件已下载", newPath));
if (DbEntity.checkDataExist(DownloadEntity.class, "downloadPath=?", newPath)) {
ALog.w(TAG, String.format("更新文件名失败,路径【%s】被其它任务占用", newPath));
return;
}

View File

@@ -35,6 +35,7 @@ public class FtpBuilderTarget extends AbsBuilderTarget<FtpBuilderTarget> {
mConfigHandler = new UNormalConfigHandler<>(this, -1);
mConfigHandler.setFilePath(filePath);
getTaskWrapper().setRequestType(ITaskWrapper.U_FTP);
getTaskWrapper().setNewTask(true);
}
/**