aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-03 20:55:31 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-03 20:55:31 +0100
commit4614ff343eda9d15eae01493be833d6c0be05d7a (patch)
tree624cb5d8959123a084035bced4410e429ffa70df /src
parent962008fec8fc06be748650fd69537b72afc6d7c1 (diff)
create file explicitly before downloading image
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpConnection.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpConnection.java b/src/main/java/eu/siacs/conversations/http/HttpConnection.java
index 24eb5ed3..147ac42f 100644
--- a/src/main/java/eu/siacs/conversations/http/HttpConnection.java
+++ b/src/main/java/eu/siacs/conversations/http/HttpConnection.java
@@ -229,6 +229,8 @@ public class HttpConnection implements Downloadable {
connection.connect();
BufferedInputStream is = new BufferedInputStream(
connection.getInputStream());
+ file.getParentFile().mkdirs();
+ file.createNewFile();
OutputStream os = file.createOutputStream();
if (os == null) {
throw new IOException();