Revision d2e9a932 src/com/rackspace/cloud/android/ContainerObjectsActivity.java

b/src/com/rackspace/cloud/android/ContainerObjectsActivity.java
575 575
									public void onClick(DialogInterface dialog,
576 576
											int whichButton) {
577 577
										// User clicked OK so do some stuff
578
										new DeleteObjectTask().execute();
578
										new DeleteObjectTask().execute(container.getName(), currentPath);
579 579
									}
580 580
								})
581 581
						.setNegativeButton("Cancel",
......
633 633

  
634 634
		if (resultCode == RESULT_OK && requestCode == 56) {
635 635
			// a sub-activity kicked back, so we want to refresh the server list
636
			previousFiles = null;
636 637
			loadFiles();
637 638
		}
638 639
		
......
644 645

  
645 646
		// deleted file so need to update the list
646 647
		if (requestCode == 55 && resultCode == 99) {
648
			Log.d(LOG,"LOADING FROM DDELETE");
649
			previousFiles = null;
647 650
			loadFiles();
648 651
		}
649 652

  
......
844 847
		}
845 848
	}
846 849

  
847
	private class DeleteObjectTask extends AsyncTask<Void, Void, HttpBundle> {
850
	private class DeleteObjectTask extends AsyncTask<String, Void, HttpBundle> {
848 851

  
849 852
		private CloudServersException exception;
850 853

  
......
857 860
		}
858 861

  
859 862
		@Override
860
		protected HttpBundle doInBackground(Void... arg0) {
863
		protected HttpBundle doInBackground(String... args) {
861 864
			HttpBundle bundle = null;
862 865
			try {
863 866
				// subtring because the current directory contains a "/" at the
864 867
				// end of the string
868
				String cname = args[0];
869
				String cpath = args[1];
865 870
				bundle = (new ContainerObjectManager(getContext()))
866
						.deleteObject(container.getName(), currentPath
867
								.substring(0, currentPath.length() - 1));
871
						.deleteObject(cname, cpath
872
								.substring(0, cpath.length() - 1));
868 873
			} catch (CloudServersException e) {
869 874
				exception = e;
870 875
			}
......
1010 1015
		protected void onPostExecute(Void arg1) {
1011 1016
			hideDialog();
1012 1017
			removeFromList(currentPath);
1018
			previousFiles=null;
1013 1019
			goUpDirectory();
1014 1020
		}
1015 1021
	}

Also available in: Unified diff