From fc2ceb4b55f287343e28685c15d44fd926005109 Mon Sep 17 00:00:00 2001 From: serso Date: Tue, 15 Mar 2016 21:48:09 +0100 Subject: [PATCH] Don't throw exception if file doesn't exist --- app/src/main/java/org/solovyev/android/io/FileLoader.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/org/solovyev/android/io/FileLoader.java b/app/src/main/java/org/solovyev/android/io/FileLoader.java index 2fe6ab4f..ecb9346a 100644 --- a/app/src/main/java/org/solovyev/android/io/FileLoader.java +++ b/app/src/main/java/org/solovyev/android/io/FileLoader.java @@ -26,6 +26,9 @@ public class FileLoader extends BaseIoLoader { @Nullable @Override protected InputStream getInputStream() throws IOException { + if (!file.exists()) { + return null; + } return new FileInputStream(file); } }