Changeset 7740 for trunk/gli/src/org/greenstone/gatherer/collection
- Timestamp:
- 2004-07-16T13:53:15+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java
r7601 r7740 40 40 import java.awt.event.*; 41 41 import java.io.*; 42 import java.net.*; 42 43 import javax.swing.*; 43 44 import javax.swing.event.*; … … 315 316 } 316 317 318 if (Gatherer.isGsdlRemote) { 319 320 String launch_cgi = Gatherer.cgiBase + "launch?cmd=deldir"; 321 322 String col_name = collection.getShortName(); 323 String dir = "."; 324 325 try { 326 327 String col_name_encoded = URLEncoder.encode(col_name,"UTF-8"); 328 String dir_encoded = URLEncoder.encode(dir,"UTF-8"); 329 330 launch_cgi += "&c=" + col_name_encoded; 331 launch_cgi += "&dir=" + dir_encoded; 332 333 URL launch_url = new URL(launch_cgi); 334 URLConnection launch_connection = launch_url.openConnection(); 335 InputStream stdis = launch_connection.getInputStream(); 336 InputStreamReader stdisr = new InputStreamReader(stdis, "UTF-8" ); 337 338 BufferedReader stdbr = new BufferedReader(stdisr); 339 340 while(true) { 341 String line = stdbr.readLine(); 342 // ignore output of running lauch command 343 344 if (line == null) { break; } 345 } 346 347 stdbr.close(); 348 } 349 // Exception 350 catch (Exception exception) { 351 Gatherer.println("Exception in GShell.runRemove() - unexpected"); 352 Gatherer.printStackTrace(exception); 353 } 354 } 355 317 356 File delete_me; 318 357 if (Gatherer.GS3) { … … 321 360 delete_me = new File(Utility.getCollectionDir(Gatherer.config.gsdl_path, collection.getShortName())); 322 361 } 323 if (Utility.delete(delete_me)) {362 if (Utility.delete(delete_me)) { 324 363 if (Gatherer.c_man.getCollection() != null && collection.getShortName().equals(Gatherer.c_man.getCollection().getName())) { 325 364 current_coll_deleted = true;
Note:
See TracChangeset
for help on using the changeset viewer.