diff --git a/src/main/java/xyz/vallat/louis/database/LanguageManager.java b/src/main/java/xyz/vallat/louis/database/LanguageManager.java index ab3da2c..9b9dbe2 100644 --- a/src/main/java/xyz/vallat/louis/database/LanguageManager.java +++ b/src/main/java/xyz/vallat/louis/database/LanguageManager.java @@ -36,10 +36,12 @@ public final class LanguageManager { logger.debug("Stored hash was '{}'.", storedHash); String actualHash = getActualHash(); logger.debug("Actual hash is '{}'.", actualHash); - logger.info("Importing new language file."); - if (storedHash == null || !storedHash.equals(actualHash)) importLanguageFile(connection); - logger.debug("Saving new hash in database."); - saveProperty(HASH_KEY, actualHash); + if (storedHash == null || !storedHash.equals(actualHash)) { + logger.info("Importing new language file."); + importLanguageFile(connection); + logger.debug("Saving new hash in database."); + saveProperty(HASH_KEY, actualHash); + } } catch (SQLException | IOException | NoSuchAlgorithmException e) { logger.error("Cannot update the languages right now. Reason: {}", e.getMessage()); if (storedHash == null || storedHash.isEmpty()) System.exit(7);