mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-25 02:02:16 -05:00
create file explicitly before downloading image
This commit is contained in:
parent
962008fec8
commit
4614ff343e
@ -229,6 +229,8 @@ public class HttpConnection implements Downloadable {
|
|||||||
connection.connect();
|
connection.connect();
|
||||||
BufferedInputStream is = new BufferedInputStream(
|
BufferedInputStream is = new BufferedInputStream(
|
||||||
connection.getInputStream());
|
connection.getInputStream());
|
||||||
|
file.getParentFile().mkdirs();
|
||||||
|
file.createNewFile();
|
||||||
OutputStream os = file.createOutputStream();
|
OutputStream os = file.createOutputStream();
|
||||||
if (os == null) {
|
if (os == null) {
|
||||||
throw new IOException();
|
throw new IOException();
|
||||||
|
Loading…
Reference in New Issue
Block a user