Changeset 22454 for main/trunk
- Timestamp:
- 2010-07-20T17:01:04+12:00 (14 years ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r22410 r22454 1206 1206 File collection_file = new File(location); 1207 1207 1208 //String collection_name = collection_directory.getName(); 1209 String collection_name = ""; 1208 1210 File collection_directory = collection_file.getParentFile(); 1209 String collection_name = collection_directory.getName(); 1211 1212 // To get colname = (colgroup/)coltailname, subtract Gatherer.getCollectDirectoryPath() from collection_directory: 1213 int index = collection_directory.getAbsolutePath().indexOf(Gatherer.getCollectDirectoryPath()); 1214 if(index == -1) { 1215 System.err.println("*** ERROR: collection directory " + collection_directory + " is not located in collect folder: " + Gatherer.getCollectDirectoryPath()); 1216 } else { 1217 index += Gatherer.getCollectDirectoryPath().length(); 1218 collection_name = collection_directory.getAbsolutePath().substring(index); 1219 } 1210 1220 1211 1221 if (Gatherer.isGsdlRemote) { -
main/trunk/gli/src/org/greenstone/gatherer/remote/RemoteGreenstoneServerAction.java
r22410 r22454 350 350 download_collection_file_command += "&file=" + URLEncoder.encode(collection_file_relative_path, "UTF-8"); 351 351 download_collection_file_command += "&lr=" + remote.lang_region; 352 String zip_file_name = collection_name + "-" + collection_file.getName() + ".zip"; 353 String zip_file_path = collection_directory_path + zip_file_name; 352 353 // String zip_file_name = collection_name + "-" + collection_file.getName() + ".zip"; 354 // String zip_file_path = collection_directory_path + zip_file_name; 355 String zip_file_path = Gatherer.getCollectDirectoryPath() + collection_name + "-" + collection_file.getName() + ".zip"; // collect/(colgroup/)coltail/colfile.zip 354 356 action_output = remote.downloadFile(download_collection_file_command, zip_file_path); 355 357 … … 582 584 583 585 // Zip up the files to send to the server 584 String zip_file_name = collection_name + "-" + System.currentTimeMillis() + ".zip"; 585 String zip_file_path = collection_directory_path + zip_file_name; 586 //String zip_file_name = collection_name + "-" + System.currentTimeMillis() + ".zip"; 587 //String zip_file_path = collection_directory_path + zip_file_name; 588 String zip_file_path = collection_directory_path; // collect/(colgroup/)coltail/ 589 String zip_file_name = new File(zip_file_path).getName() + "-" + System.currentTimeMillis() + ".zip"; // <collection_tail_name>-<time>.zip 590 zip_file_path += zip_file_name; // collect/(colgroup/)coltail/coltail-time.zip 586 591 ZipTools.zipFiles(zip_file_path, collection_directory_path, collection_file_relative_paths); 587 592 … … 628 633 progress_bar.setAction("Uploading files into collection..."); 629 634 630 String zip_file_name = collection_name + "-" + System.currentTimeMillis() + ".zip"; 631 String zip_file_path = Gatherer.getCollectDirectoryPath() + zip_file_name; 635 //String zip_file_name = collection_name + "-" + System.currentTimeMillis() + ".zip"; 636 //String zip_file_path = Gatherer.getCollectDirectoryPath() + zip_file_name; 637 String zip_file_path = Gatherer.getCollectDirectoryPath() 638 + collection_name + "-" + System.currentTimeMillis() + ".zip"; // "collect/(colgroup/)collection_tail_name-<time>.zip" 639 String zip_file_name = new File(zip_file_path).getName(); // "collection_tail_name-<time>.zip" 632 640 DebugStream.println("Zip file path: " + zip_file_path); 633 641 -
main/trunk/gli/src/org/greenstone/gatherer/shell/GShell.java
r18589 r22454 524 524 } 525 525 526 /** Method for firing a process begun event which is called, strang ly enough, when the process begins.526 /** Method for firing a process begun event which is called, strangely enough, when the process begins. 527 527 * @param type An <strong>int</strong> indicating the process type. 528 528 * @param status An <strong>int</strong> specifying the current status of the process.
Note:
See TracChangeset
for help on using the changeset viewer.