Browse Source

REPORT-40472 [回归]修复更新升级还原到以前版本后,还可以还原到以前版本

feature/big-screen
Bryant 4 years ago
parent
commit
cd8b852cb5
  1. 4
      designer-base/src/main/java/com/fr/design/update/ui/dialog/RestoreDialog.java
  2. 4
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java
  3. 2
      designer-base/src/main/java/com/fr/design/update/utils/UpdateFileUtils.java

4
designer-base/src/main/java/com/fr/design/update/ui/dialog/RestoreDialog.java

@ -4,7 +4,7 @@ import com.fr.decision.update.data.UpdateConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.update.utils.FileUtils;
import com.fr.design.update.utils.UpdateFileUtils;
import com.fr.design.update.ui.widget.ColorfulCellRender;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ArrayUtils;
@ -86,7 +86,7 @@ public class RestoreDialog extends JDialog {
JPanel jarListPane = new JPanel();
jarListPane.setLayout(new BoxLayout(jarListPane, BoxLayout.Y_AXIS));
String[] jarBackupFiles = FileUtils.listFilteredFiles(StableUtils.getInstallHome(), UpdateConstants.DESIGNER_BACKUP_DIR);
String[] jarBackupFiles = UpdateFileUtils.listFilteredFiles(StableUtils.getInstallHome(), UpdateConstants.DESIGNER_BACKUP_DIR);
ArrayUtils.reverse(jarBackupFiles);
String[] jarFilesList = ((jarBackupFiles.length < NUMOFCELL_LEAST) ? Arrays.copyOf(jarBackupFiles, NUMOFCELL_LEAST) : jarBackupFiles);

4
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -17,7 +17,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.update.actions.FileProcess;
import com.fr.design.update.domain.UpdateInfoCachePropertyManager;
import com.fr.design.update.utils.FileUtils;
import com.fr.design.update.utils.UpdateFileUtils;
import com.fr.design.update.ui.widget.LoadingLabel;
import com.fr.design.update.ui.widget.UpdateActionLabel;
import com.fr.design.update.ui.widget.UpdateInfoTable;
@ -320,7 +320,7 @@ public class UpdateMainDialog extends UIDialog {
}
});
//choose RestoreLabel to show
boolean isNeedRestore = ArrayUtils.isNotEmpty(FileUtils.listFilteredFiles(StableUtils.getInstallHome(), getBackupDirectory()));
boolean isNeedRestore = ArrayUtils.isNotEmpty(UpdateFileUtils.listFilteredFiles(StableUtils.getInstallHome(), getBackupDirectory()));
jarRestoreLabel = isNeedRestore ? jarRestorePreviousRevision : noJarPreviousRevision;
}

2
designer-base/src/main/java/com/fr/design/update/utils/FileUtils.java → designer-base/src/main/java/com/fr/design/update/utils/UpdateFileUtils.java

@ -11,7 +11,7 @@ import java.util.List;
* @version 10.0
* Created by Bryant on 2020-09-25
*/
public class FileUtils {
public class UpdateFileUtils {
/**
* 列出过滤后的文件
Loading…
Cancel
Save