/*
- * Copyright 2011 GRNET S.A. All rights reserved.
+ * Copyright 2011-2012 GRNET S.A. All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
*/
package gr.grnet.pithos.web.client.commands;
-import java.util.Iterator;
-
import gr.grnet.pithos.web.client.Pithos;
import gr.grnet.pithos.web.client.foldertree.File;
import gr.grnet.pithos.web.client.foldertree.Folder;
import gr.grnet.pithos.web.client.rest.GetRequest;
import gr.grnet.pithos.web.client.rest.RestException;
+import java.util.Iterator;
+
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.http.client.Response;
@Override
public void execute() {
String path = _f.getUri();
- DeleteRequest deleteF = new DeleteRequest(app.getApiPath(), _f.getOwner(), path) {
+ DeleteRequest deleteF = new DeleteRequest(app.getApiPath(), _f.getOwner(), URL.encode(path)) {
@Override
- public void onSuccess(@SuppressWarnings("unused") Resource result) {
+ public void onSuccess(Resource _result) {
deleteSubfolder(iter2, callback);
}
if (iter.hasNext()) {
File f = iter.next();
String path = f.getUri();
- DeleteRequest deleteF = new DeleteRequest(app.getApiPath(), f.getOwner(), path) {
+ DeleteRequest deleteF = new DeleteRequest(app.getApiPath(), f.getOwner(), URL.encode(path)) {
@Override
- public void onSuccess(@SuppressWarnings("unused") Resource result) {
+ public void onSuccess(Resource result) {
deleteFile(iter, callback);
}