Changeset 22410 for main/trunk/gli/src/org/greenstone/gatherer/remote/RemoteGreenstoneServerAction.java
- Timestamp:
- 2010-07-15T22:10:59+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/remote/RemoteGreenstoneServerAction.java
r19231 r22410 118 118 119 119 String delete_collection_command = "cmd=delete-collection"; 120 delete_collection_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");120 delete_collection_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 121 121 action_output = remote.sendCommandToServer(delete_collection_command, null); 122 122 } … … 150 150 151 151 String delete_collection_file_command = "cmd=delete-collection-file"; 152 delete_collection_file_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");152 delete_collection_file_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 153 153 delete_collection_file_command += "&file=" + Base64.encodeBytes(collection_file_relative_path.getBytes()); 154 154 action_output = remote.sendCommandToServer(delete_collection_file_command, null); … … 178 178 179 179 String download_collection_command = "cmd=download-collection"; 180 download_collection_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");180 download_collection_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 181 181 download_collection_command += "&lr=" + remote.lang_region; 182 182 String zip_file_path = Gatherer.getCollectDirectoryPath() + collection_name + ".zip"; … … 213 213 214 214 String download_collection_archives_command = "cmd=download-collection-archives"; 215 download_collection_archives_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");215 download_collection_archives_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 216 216 download_collection_archives_command += "&lr=" + remote.lang_region; 217 217 String zip_file_path = Gatherer.getCollectDirectoryPath() + collection_name + "-archives.zip"; … … 310 310 311 311 String file_exists_command = "cmd=file-exists"; 312 file_exists_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");312 file_exists_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 313 313 // base64 encode the filename to preserve special characters 314 314 file_exists_command += "&file=" + Base64.encodeBytes(collection_file_relative_path.getBytes()); … … 347 347 348 348 String download_collection_file_command = "cmd=download-collection-file"; 349 download_collection_file_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");349 download_collection_file_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 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; … … 470 470 471 471 String move_collection_file_command = "cmd=move-collection-file"; 472 move_collection_file_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");472 move_collection_file_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 473 473 move_collection_file_command += "&source=" + Base64.encodeBytes(source_collection_file_relative_path.getBytes()); 474 474 move_collection_file_command += "&target=" + Base64.encodeBytes(target_collection_file_relative_path.getBytes()); … … 507 507 508 508 String new_collection_directory_command = "cmd=new-collection-directory"; 509 new_collection_directory_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");509 new_collection_directory_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 510 510 new_collection_directory_command += "&directory=" + URLEncoder.encode(new_collection_directory_relative_path, "UTF-8"); 511 511 action_output = remote.sendCommandToServer(new_collection_directory_command, null); … … 541 541 542 542 String run_script_command = "cmd=run-script"; 543 run_script_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");543 run_script_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 544 544 run_script_command += "&script=" + script_name; 545 545 run_script_command += "&language=" + Configuration.getLanguage(); … … 588 588 // Upload the zip file 589 589 String upload_collection_file_command = "cmd=upload-collection-file"; 590 upload_collection_file_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");590 upload_collection_file_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 591 591 upload_collection_file_command += "&file=" + URLEncoder.encode(zip_file_name, "UTF-8"); 592 592 upload_collection_file_command += "&directory="; … … 643 643 644 644 String upload_collection_file_command = "cmd=upload-collection-file"; 645 upload_collection_file_command += "&c=" + URLEncoder.encode(collection_name , "UTF-8");645 upload_collection_file_command += "&c=" + URLEncoder.encode(collection_name.replace(File.separatorChar, '|'), "UTF-8"); 646 646 upload_collection_file_command += "&file=" + URLEncoder.encode(zip_file_name, "UTF-8"); 647 647 upload_collection_file_command += "&directory=" + URLEncoder.encode(target_collection_directory_relative_path, "UTF-8");
Note:
See TracChangeset
for help on using the changeset viewer.