- Timestamp:
- 2014-04-24T21:34:33+12:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r23238 r28995 43 43 import org.greenstone.gatherer.shell.GShellListener; 44 44 import org.greenstone.gatherer.shell.GShellProgressMonitor; 45 45 46 46 47 /** A dialog which provides a straight-forward access to the currently installed collections. It also will contain the ability to continue through to the original OpenCollectionDialog if your source collection is located somewhere other than the gsdl collect folder. */ … … 399 400 process.run(); // Don't bother threading this... yet 400 401 401 collect_cfg_file.delete(); 402 build_cfg_file.delete(); 402 // From now, won't dangerously delete GS2 collect and build config files anymore 403 //collect_cfg_file.delete(); 404 //build_cfg_file.delete(); 405 406 File collect_bak_file = new File(collection_folder.getAbsolutePath() + File.separator + "etc" + File.separator + "collect.cfg.bak"); 407 File build_bak_file = new File(collection_folder.getAbsolutePath() + File.separator+"index" + File.separator + "build.cfg.bak"); 408 if(!collect_cfg_file.renameTo(collect_bak_file)) { 409 System.err.println("Unable to move collect.cfg to " + collect_bak_file); 410 } 411 if(!build_cfg_file.renameTo(build_bak_file)) { 412 System.err.println("Unable to move build.cfg to " + build_bak_file); 413 } 403 414 } 404 415 } … … 415 426 //**************** 416 427 File collect_cfg_file = collection_configuration.getFile(); // returns the collect.cfg file 417 File etc_folder = collect_cfg_file.getParentFile(); 418 File collection_folder = etc_folder.getParentFile(); 419 filename = collection_folder.getAbsolutePath() + File.separator + "gli.col"; 420 collection_folder = null; 421 etc_folder = null; 422 collect_cfg_file = null; 423 collection_configuration = null; 428 result = FormatConversionDialog.checkForGS2FormatStatements(collect_cfg_file); 429 if(result == OK_OPTION) { // either there were no gs2 format stmts or user chose to proceed 430 File etc_folder = collect_cfg_file.getParentFile(); 431 File collection_folder = etc_folder.getParentFile(); 432 filename = collection_folder.getAbsolutePath() + File.separator + "gli.col"; 433 collection_folder = null; 434 etc_folder = null; 435 collect_cfg_file = null; 436 collection_configuration = null; 437 } 424 438 OpenCollectionDialog.this.dispose(); 425 439 } 426 440 427 Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), 441 if(result == OK_OPTION) { 442 Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), 428 443 newCollectPath, Gatherer.g_man.getContentPane()); 429 444 // will tell the server that the collect directory has changed and that 430 445 // the workspace needs to be refreshed (Documents in Greenstone Collections) 446 } 431 447 } 432 448 }
Note:
See TracChangeset
for help on using the changeset viewer.