aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-06-25 12:01:16 +0200
committerChristian Schneppe <christian@pix-art.de>2019-06-25 12:01:16 +0200
commite09feea27ceb9729264cf8c19296b6a2a68238a7 (patch)
tree6848195b28e2d3b87c1c7210f3f26042bd333477 /src/main/java/de/pixart/messenger/ui
parentfc602a713d3d3df2816670ea9aa75dbbe17aff59 (diff)
fix broken updater
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/UpdaterActivity.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java b/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java
index 046c9cba0..5c8b105a2 100644
--- a/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java
@@ -350,6 +350,12 @@ public class UpdaterActivity extends XmppActivity {
// might be -1: server did not report the length
int fileLength = connection.getContentLength();
+ // create folders
+ File parentDirectory = file.getParentFile();
+ if (parentDirectory.mkdirs()) {
+ Log.d(Config.LOGTAG, "created " + parentDirectory.getAbsolutePath());
+ }
+
// download the file
is = connection.getInputStream();
os = new FileOutputStream(file);