修复ftp上传完成后,删除服务器端的文件,无法重新下载的问题

This commit is contained in:
laoyuyu
2020-01-06 19:59:17 +08:00
parent e14928e260
commit 8158c58d6e
29 changed files with 290 additions and 74 deletions

View File

@@ -65,6 +65,15 @@ public class RecordUtil {
return;
}
DownloadGroupEntity groupEntity = DbDataHelper.getDGEntityByPath(dirPath);
// 处理组任务存在,而子任务为空的情况
if (groupEntity == null) {
groupEntity = DbEntity.findFirst(DownloadGroupEntity.class, "dirPath=?", dirPath);
if (groupEntity != null) {
groupEntity.deleteData();
DbEntity.deleteData(DownloadEntity.class, "groupHash=?", groupEntity.getGroupHash());
}
return;
}
delGroupTaskRecord(groupEntity, removeFile, true);
}