From ad768d1938dd31cde5622e834edc01960b5c7039 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 20 Mar 2018 09:04:04 +0100 Subject: [PATCH] improved logging while deleting old cache files --- .../eu/siacs/conversations/services/BarcodeProvider.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/BarcodeProvider.java b/src/main/java/eu/siacs/conversations/services/BarcodeProvider.java index 98abbd2af..e826960cb 100644 --- a/src/main/java/eu/siacs/conversations/services/BarcodeProvider.java +++ b/src/main/java/eu/siacs/conversations/services/BarcodeProvider.java @@ -78,8 +78,9 @@ public class BarcodeProvider extends ContentProvider implements ServiceConnectio if (barcodeDirectory.exists() && barcodeDirectory.isDirectory()) { for (File file : barcodeDirectory.listFiles()) { if (file.isFile() && !file.isHidden()) { - Log.d(Config.LOGTAG, "deleting old barcode file " + file.getAbsolutePath()); - file.delete(); + if (file.delete()) { + Log.d(Config.LOGTAG, "deleted old barcode file " + file.getAbsolutePath()); + } } } }