create file explicitly before downloading image

iNPUTmice created

Change summary

src/main/java/eu/siacs/conversations/http/HttpConnection.java | 2 ++
1 file changed, 2 insertions(+)

Detailed changes

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();