diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-01-25 21:17:17 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-01-25 21:17:17 +0100 |
commit | 001ffba4204c80c7058240cd59745446a9b90811 (patch) | |
tree | 1cbddcd8b23d4b0213d2ce6b8d1674cf1154bac5 /src/main/java/de/pixart/messenger | |
parent | afcbc3ccf36a44ebb1ff2b3b471078aa13e2aeb2 (diff) |
don’t check if files exists when loading attachments
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/FileBackend.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index ce3759bb3..1dca582b0 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -264,13 +264,8 @@ public class FileBackend { List<Attachment> attachments = new ArrayList<>(); for (DatabaseBackend.FilePath relativeFilePath : relativeFilePaths) { final String mime = MimeUtils.guessMimeTypeFromExtension(MimeUtils.extractRelevantExtension(relativeFilePath.path)); - Log.d(Config.LOGTAG, "mime=" + mime); - File file = getFileForPath(relativeFilePath.path, mime); - if (file.exists()) { - attachments.add(Attachment.of(relativeFilePath.uuid, file, mime)); - } else { - Log.d(Config.LOGTAG, "file " + file.getAbsolutePath() + " doesn't exist"); - } + final File file = getFileForPath(relativeFilePath.path, mime); + attachments.add(Attachment.of(relativeFilePath.uuid, file, mime)); } return attachments; } |