- Timestamp:
- 2006-01-17T11:03:16+13:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/LocalLibraryServer.java
r10643 r11049 212 212 } 213 213 214 //if(gsdlsite_cfg_file.getURL() != null) {215 //JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Server.QuitManual"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);216 //}217 218 214 // Restore the gsdlsite_cfg. 219 215 gsdlsite_cfg_file.restore(); … … 221 217 // If the local server is still running then our changed values will get overwritten. 222 218 if (gsdlsite_cfg_file.getURL() != null) { 223 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Server.Quit Failed"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);219 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Server.QuitManual"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 224 220 } 225 221 -
trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java
r11048 r11049 469 469 // If the file isn't in the images folder, then ask the user if they want to copy it there 470 470 File file = file_chooser.getSelectedFile(); 471 if(!file.getParentFile().equals(images_folder)) { 472 if(true) { //JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("CDM.General.Copy_Image"), Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { 473 // Copy the file 474 try { 475 File collection_image_file = new File(images_folder, file.getName()); 476 Gatherer.f_man.getQueue().copyFile(file, collection_image_file, null); 477 478 // If we're using a remote Greenstone server, upload the image 479 if (Gatherer.isGsdlRemote) { 480 RemoteGreenstoneServer.uploadCollectionFile(Gatherer.c_man.getCollection().getName(), collection_image_file); 481 } 482 } 483 catch(Exception exception) { 484 DebugStream.printStackTrace(exception); 485 // Show warning 486 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.General.Image_Copy_Failed"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 487 // Nothing else we can do. 488 return; 471 if (!file.getParentFile().equals(images_folder)) { 472 // Copy the file 473 try { 474 File collection_image_file = new File(images_folder, file.getName()); 475 Gatherer.f_man.getQueue().copyFile(file, collection_image_file, null); 476 477 // If we're using a remote Greenstone server, upload the image 478 if (Gatherer.isGsdlRemote) { 479 RemoteGreenstoneServer.uploadCollectionFile(Gatherer.c_man.getCollection().getName(), collection_image_file); 489 480 } 490 481 } 491 else { 492 // Nothing we can safely do 482 catch(Exception exception) { 483 DebugStream.printStackTrace(exception); 484 // Show warning 485 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.General.Image_Copy_Failed"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 486 // Nothing else we can do. 493 487 return; 494 488 } 495 489 } 490 496 491 // Create the path starting _httpcollection_/images/<filename> 497 492 String path = prefix + file.getName(); -
trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java
r10689 r11049 409 409 new_node = directory_record; 410 410 } 411 // Else inform the users that a directory already exists and files will be copied into it 412 //else { 413 // JOptionPane.showMessageDialog(null, Dictionary.get("FileActions.Directory_Exists", target_file.toString()), Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE); 414 //} 411 415 412 // Queue non-filtered child files for copying. If this directory already existed, the child records will have to generate the undo jobs, as we don't want to entirely delete this directory if it already existed. 416 413 FileNode child_record = null;
Note:
See TracChangeset
for help on using the changeset viewer.