aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/http
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-01-30 20:15:01 +0100
committerChristian Schneppe <christian@pix-art.de>2018-01-30 20:15:01 +0100
commitaf8b48b3400b5eac6ddb22b1efde19b10dac3183 (patch)
tree785d9d36740829f63a3bb6518556de4a95e2f3e9 /src/main/java/de/pixart/messenger/http
parent7a67de94628dfe12b8790c333e5c5c19e647caab (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.java2
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()) {