Skip to content

Commit

Permalink
Delete cash directory on close
Browse files Browse the repository at this point in the history
Deletes cash directory on close and start up
Fixes #684
  • Loading branch information
1-alex98 committed Jan 10, 2018
1 parent 7f337b4 commit 15a15c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/faforever/client/theme/UiServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,12 @@ private Theme readTheme(Reader reader) throws IOException {
}

@PreDestroy
void preDestroy() {
void preDestroy() throws IOException {
IOUtils.closeQuietly(watchService);
Path cacheStylesheetsDirectory = preferencesService.getCacheStylesheetsDirectory();
if (Files.exists(cacheStylesheetsDirectory)) {
deleteRecursively(cacheStylesheetsDirectory);
}
}

private void stopWatchingTheme(Theme theme) {
Expand Down

0 comments on commit 15a15c8

Please sign in to comment.