diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-01-30 20:15:01 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-01-30 20:15:01 +0100 |
commit | af8b48b3400b5eac6ddb22b1efde19b10dac3183 (patch) | |
tree | 785d9d36740829f63a3bb6518556de4a95e2f3e9 /src/main/java/de/pixart/messenger/http | |
parent | 7a67de94628dfe12b8790c333e5c5c19e647caab (diff) |
discover file extension in original filename from pgp
Diffstat (limited to 'src/main/java/de/pixart/messenger/http')
-rw-r--r-- | src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java index d8fdfb79e..9985cf929 100644 --- a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java +++ b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java @@ -95,7 +95,7 @@ public class HttpDownloadConnection implements Transferable { extension = lastPart; } String filename = fileDateFormat.format(new Date(message.getTimeSent())) + "_" + message.getUuid().substring(0, 4); - message.setRelativeFilePath(filename + "." + extension); + message.setRelativeFilePath(filename + (extension != null ? ("." + extension) : "")); this.file = mXmppConnectionService.getFileBackend().getFile(message, false); final String reference = mUrl.getRef(); if (reference != null && AesGcmURLStreamHandler.IV_KEY.matcher(reference).matches()) { |