From 1e72f7f5e30560d127069fbaa0f04c0263e36565 Mon Sep 17 00:00:00 2001 From: PaulStets Date: Tue, 19 Sep 2017 16:18:33 +0300 Subject: [PATCH] Fixed issue #4447 --- .../plus/download/ui/LocalIndexesFragment.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java index e7d6193aa2..79a106999f 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java @@ -467,14 +467,14 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement if (operation == DELETE_OPERATION) { File f = new File(info.getPathToData()); successfull = Algorithms.removeAllFiles(f); - if (InAppHelper.isSubscribedToLiveUpdates()) { - String fileNameWithoutExtension = - Algorithms.getFileNameWithoutExtension(f); - IncrementalChangesManager changesManager = - getMyApplication().getResourceManager().getChangesManager(); - changesManager.deleteUpdates(fileNameWithoutExtension); - } - if (successfull) { + if (InAppHelper.isSubscribedToLiveUpdates()) { + String fileNameWithoutExtension = + Algorithms.getFileNameWithoutExtension(f); + IncrementalChangesManager changesManager = + getMyApplication().getResourceManager().getChangesManager(); + changesManager.deleteUpdates(fileNameWithoutExtension); + } + if (successfull) { getMyApplication().getResourceManager().closeFile(info.getFileName()); } } else if (operation == RESTORE_OPERATION) {