diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-11-03 20:55:31 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-11-03 20:55:31 +0100 |
commit | 4614ff343eda9d15eae01493be833d6c0be05d7a (patch) | |
tree | 624cb5d8959123a084035bced4410e429ffa70df | |
parent | 962008fec8fc06be748650fd69537b72afc6d7c1 (diff) |
create file explicitly before downloading image
-rw-r--r-- | src/main/java/eu/siacs/conversations/http/HttpConnection.java | 2 |
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 24eb5ed3e..147ac42f2 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(); |