Skip to content

Commit

Permalink
DownloadResponseHandler: don't append to existing file on retries
Browse files Browse the repository at this point in the history
  • Loading branch information
ndushay committed May 25, 2017
1 parent 5f8bbc5 commit fc5f5df
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/edu/stanford/dlss/was/DownloadResponseHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ public DownloadResponseHandler(String outPath) {
public Boolean handleResponse(final HttpResponse response) throws ClientProtocolException, HttpResponseException, IOException {
HttpEntity entity = response.getEntity();


if (WasapiValidator.validateResponse(response.getStatusLine(), entity == null)) {
FileOutputStream fouts = new FileOutputStream(outputPath);
FileOutputStream fouts = new FileOutputStream(outputPath, false);
entity.writeTo(fouts);
fouts.close();
return true;
Expand Down

0 comments on commit fc5f5df

Please sign in to comment.