improved logging while deleting old cache files

This commit is contained in:
Daniel Gultsch 2018-03-20 09:04:04 +01:00
parent 2d59a99833
commit ad768d1938
1 changed files with 3 additions and 2 deletions

View File

@ -78,8 +78,9 @@ public class BarcodeProvider extends ContentProvider implements ServiceConnectio
if (barcodeDirectory.exists() && barcodeDirectory.isDirectory()) { if (barcodeDirectory.exists() && barcodeDirectory.isDirectory()) {
for (File file : barcodeDirectory.listFiles()) { for (File file : barcodeDirectory.listFiles()) {
if (file.isFile() && !file.isHidden()) { if (file.isFile() && !file.isHidden()) {
Log.d(Config.LOGTAG, "deleting old barcode file " + file.getAbsolutePath()); if (file.delete()) {
file.delete(); Log.d(Config.LOGTAG, "deleted old barcode file " + file.getAbsolutePath());
}
} }
} }
} }