Changeset 11049 for trunk/gli/src/org/greenstone/gatherer/cdm
- Timestamp:
- 2006-01-17T11:03:16+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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();
Note:
See TracChangeset
for help on using the changeset viewer.