X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/c7dc13598737ff21a5d358f5fa4d1f38e2d70fb9..aa14479e5b2eefdbd654465ce2c9c90b171f6355:/src/eu/alefzero/webdav/WebdavClient.java diff --git a/src/eu/alefzero/webdav/WebdavClient.java b/src/eu/alefzero/webdav/WebdavClient.java index 2e3ef874..f3aca3e5 100644 --- a/src/eu/alefzero/webdav/WebdavClient.java +++ b/src/eu/alefzero/webdav/WebdavClient.java @@ -22,7 +22,6 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.util.Random; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.HttpClient; @@ -102,12 +101,12 @@ public class WebdavClient extends HttpClient { mDataTransferListener.transferProgress(readResult); fos.write(bytes, 0, readResult); } + fos.close(); ret = true; } else { exhaustResponse(get.getResponseBodyAsStream()); } Log.e(TAG, "Download of " + remoteFilePath + " to " + targetFile + " finished with HTTP status " + status + (!ret?"(FAIL)":"")); - } catch (Exception e) { logException(e, "dowloading " + remoteFilePath);