From a644b40c3eb48d493b36ce1a07a422e927c8ce9d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 10 Jan 2019 17:43:09 +0100 Subject: [PATCH] =?UTF-8?q?don=E2=80=99t=20check=20if=20files=20exists=20w?= =?UTF-8?q?hen=20loading=20attachments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eu/siacs/conversations/persistance/FileBackend.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index 012ad1191..459cb88ba 100644 --- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java @@ -518,13 +518,8 @@ public class FileBackend { List 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()+" doesnt exist"); - } + final File file = getFileForPath(relativeFilePath.path, mime); + attachments.add(Attachment.of(relativeFilePath.uuid, file, mime)); } return attachments; }