From e09feea27ceb9729264cf8c19296b6a2a68238a7 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Tue, 25 Jun 2019 12:01:16 +0200 Subject: fix broken updater --- src/main/java/de/pixart/messenger/ui/UpdaterActivity.java | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3