迁移数据时,源目录文件不存在时,迁移失败。

web_backend_develope
chenlw 9 years ago
parent b803b3825c
commit df71293e0d

@ -101,12 +101,20 @@ public class ThreadMoveData{
srcSizeTemp = show.getFolderSize(dataMove.getDataPath());
long srcSize = (long) (srcSizeTemp * 0.998);
dstSize = show.getFolderSize(dataMove.getDstPath());
boolean isExist = false;
if (srcSize < 0) {
log.error(dataMove.getDataPath() + " : 路径不存在! ");
continue;
isExist = true;
}
if (dstSize < 0) {
log.error(dataMove.getDstPath() + " : 路径不存在! ");
isExist = true;
}
if (isExist) {
// 3:表示 迁移失败
dataMove.setLastTime(DateForm.date2StringBysecond(new Date()));
dataMove.setCompleteStatus("3");
dataInfoMoveTmpDao.update(dataMove);
continue;
}
if (srcSize > 0 && dstSize > 0) {

Loading…
Cancel
Save