Changeset 37691
- Timestamp:
- 2023-04-20T22:04:00+12:00 (12 months ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer/gui
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
r37690 r37691 633 633 if(event.getType() == GShell.IMPORT && 634 634 (event.getStatus() == GShell.CANCELLED || event.getStatus() == GShell.ERROR)) { 635 //System.err.println("********* in processComplete CANCELLED IMPORT");636 635 moveAnyKeepOldToArchives(); 637 636 } … … 663 662 File archives_dir = new File(archives); 664 663 665 if(archives_dir.exists()) { 666 // no special behaviour for remote GS or fedora. The minimal (incr) rebuild 667 // button is already disabled for remote GS. 668 669 // Locally delete archives dir, and if that worked, rename keepold 670 if(Utility.delete(archives_dir)) { 671 // move "archives_keepold" to "archives" 672 if(!archives_keepold_dir.renameTo(archives_dir)) { 673 statusMsg = "Failed to rename " + archives_keepold_dir 674 + "\n to " + archives_dir; 675 //document.appendLine(statusMsg); 676 System.err.println(statusMsg); 677 this.shell.fireMessage(statusMsg); 678 } 679 } else { 680 statusMsg = "Failed to delete " + archives_dir 681 + " in attempt to rename archives_keepold to archives"; 682 //document.appendLine(statusMsg); 664 // no special behaviour for remote GS or fedora. The minimal (incr) rebuild 665 // button is already disabled for remote GS. 666 667 // First locally delete archives dir if any exists 668 if(archives_dir.exists() && !Utility.delete(archives_dir)) { 669 statusMsg = "Failed to delete " + archives_dir 670 + " in attempt to rename archives_keepold to archives"; 671 System.err.println(statusMsg); 672 this.shell.fireMessage(statusMsg); 673 } 674 675 if(!archives_dir.exists()) { 676 // Rename archives_keepold folder to archives 677 if(!archives_keepold_dir.renameTo(archives_dir)) { 678 statusMsg = "Failed to rename " + archives_keepold_dir 679 + "\n to " + archives_dir; 683 680 System.err.println(statusMsg); 684 681 this.shell.fireMessage(statusMsg); 685 } 686 } 687 // do what the message() method does after appending to document (build log) 688 //log_textarea.setCaretPosition(document.getLengthToNearestLine()); 682 } 683 } 689 684 } 690 685 } … … 760 755 Collection collection = Gatherer.c_man.getCollection(); 761 756 String collection_name = collection.getName(); 757 758 // Take care of the case if we have a stray archives_keepold folder 759 File archives_keepold_dir = new File(CollectionManager.getLoadedCollectionArchivesKeepOldDirectoryPath()); 760 if(archives_keepold_dir.exists()) { 761 WarnIncrBuildDialog dialog = new WarnIncrBuildDialog(); 762 int result = dialog.display(); 763 dialog.dispose(); 764 dialog = null; 765 if(result == WarnIncrBuildDialog.CANCEL) { // user chose not to build after all 766 return; 767 } 768 } 762 769 763 770 //if button is labelled for Building
Note:
See TracChangeset
for help on using the changeset viewer.