Skip to content

Commit

Permalink
Former-commit-id: bd0872d2f3979f73cd4cff57fd113ff483dbfb52
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Mar 1, 2012
1 parent 7466438 commit 9c48d90
Showing 1 changed file with 6 additions and 29 deletions.
35 changes: 6 additions & 29 deletions source/ch/cyberduck/core/s3/S3Path.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,7 @@
* dkocher@cyberduck.ch
*/

import ch.cyberduck.core.AbstractPath;
import ch.cyberduck.core.Acl;
import ch.cyberduck.core.AttributedList;
import ch.cyberduck.core.ConnectionCanceledException;
import ch.cyberduck.core.Credentials;
import ch.cyberduck.core.Local;
import ch.cyberduck.core.LoginController;
import ch.cyberduck.core.LoginControllerFactory;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathFactory;
import ch.cyberduck.core.Permission;
import ch.cyberduck.core.Preferences;
import ch.cyberduck.core.StreamListener;
import ch.cyberduck.core.*;
import ch.cyberduck.core.cloud.CloudPath;
import ch.cyberduck.core.http.DelayedHttpEntityCallable;
import ch.cyberduck.core.http.ResponseOutputStream;
Expand Down Expand Up @@ -72,17 +60,7 @@
import java.security.NoSuchAlgorithmException;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
import java.util.*;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
Expand Down Expand Up @@ -845,15 +823,11 @@ public Thread newThread(Runnable r) {
catch(InterruptedException e) {
log.error("Part upload failed:" + e.getMessage());
status().setComplete(false);
// Cancel future tasks
pool.shutdown();
throw new ConnectionCanceledException(e.getMessage());
}
catch(ExecutionException e) {
log.warn("Part upload failed:" + e.getMessage());
status().setComplete(false);
// Cancel future tasks
pool.shutdown();
if(e.getCause() instanceof ServiceException) {
throw (ServiceException) e.getCause();
}
Expand All @@ -873,6 +847,8 @@ public Thread newThread(Runnable r) {
log.info(String.format("Cancel multipart upload %s", multipart.getUploadId()));
this.getSession().getClient().multipartAbortUpload(multipart);
}
// Cancel future tasks
pool.shutdown();
}
}

Expand Down Expand Up @@ -1021,11 +997,12 @@ public AttributedList<Path> list(final AttributedList<Path> children) {
Preferences.instance().getInteger("s3.listing.chunksize"),
priorLastKey, priorLastVersionId, true);
children.addAll(this.listVersions(container, Arrays.asList(chunk.getItems())));
priorLastKey = chunk.getNextKeyMarker();
priorLastVersionId = chunk.getNextVersionIdMarker();
}
while(priorLastKey != null);
}
}

}
}
catch(ServiceException e) {
Expand Down

0 comments on commit 9c48d90

Please sign in to comment.