Browse Source

REPORT-100518 无磁盘写入权限,版本迁移无异常提示

newui
Destiny.Lin 1 year ago
parent
commit
c7ea9190a7
  1. 28
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java

28
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java

@ -378,7 +378,7 @@ public class VcsMovePanel extends BasicPane {
}
private class MoveWorker extends SwingWorker<Void, Integer> {
private class MoveWorker extends SwingWorker<Boolean, Integer> {
private VcsMoveStrategy strategy;
@ -387,7 +387,7 @@ public class VcsMovePanel extends BasicPane {
}
@Override
protected Void doInBackground() throws Exception {
protected Boolean doInBackground() throws Exception {
try {
//开始迁移
VcsMoveService.getInstance().startMove(new VcsMoveService.BaseMoveServiceWhileMoving() {
@ -402,13 +402,10 @@ public class VcsMovePanel extends BasicPane {
}
}, strategy);
} catch (Exception e) {
this.cancel(true);
VcsMoveService.getInstance().stopMoving();
initFailedPane();
VcsMovePanel.this.getParentCard().show(getParentPane(), FAILED);
FineLoggerFactory.getLogger().error("[VcsV2] Vcs move failed!");
return false;
}
return null;
return true;
}
@Override
@ -419,13 +416,22 @@ public class VcsMovePanel extends BasicPane {
@Override
protected void done() {
VcsMoveService.getInstance().stopMoving();
initSuccessPane();
VcsMovePanel.this.getParentCard().show(getParentPane(), SUCCESS);
VcsHelper.getInstance().updateLegacyMode();
try {
if (get()) {
initSuccessPane();
VcsMovePanel.this.getParentCard().show(getParentPane(), SUCCESS);
VcsHelper.getInstance().updateLegacyMode();
} else {
initFailedPane();
VcsMovePanel.this.getParentCard().show(getParentPane(), FAILED);
FineLoggerFactory.getLogger().error("[VcsV2] Vcs move failed!");
}
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
}
}
}
/**
* 迁移回调事件
*

Loading…
Cancel
Save