diff --git a/client/src/main/java/ctbrec/ui/CamrecApplication.java b/client/src/main/java/ctbrec/ui/CamrecApplication.java index 87c9a5f2..a10e5d4e 100644 --- a/client/src/main/java/ctbrec/ui/CamrecApplication.java +++ b/client/src/main/java/ctbrec/ui/CamrecApplication.java @@ -441,12 +441,16 @@ public class CamrecApplication extends Application { } private void clearHttpCache() throws IOException { - File httpCacheDir = new File(config.getConfigDir(), "cache"); - LOG.debug("Deleting http cache {}", httpCacheDir); - HttpClientCacheProvider.getCache(config).evictAll(); - HttpClientCacheProvider.getCache(config).close(); - IoUtils.deleteDirectory(httpCacheDir); - LOG.debug("Cache has been deleted"); + try { + File httpCacheDir = new File(config.getConfigDir(), "cache"); + LOG.debug("Deleting http cache {}", httpCacheDir); + HttpClientCacheProvider.getCache(config).evictAll(); + HttpClientCacheProvider.getCache(config).close(); + IoUtils.deleteDirectory(httpCacheDir); + LOG.debug("Cache has been deleted"); + } catch (Exception e) { + LOG.info("The HTTP cache was not completely deleted: {}", e.getLocalizedMessage()); + } } private void registerAlertSystem() {