Fixed a small bug that would still import the languages if not needed
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
aad2f391fb
commit
485abe29e3
@ -36,10 +36,12 @@ public final class LanguageManager {
|
||||
logger.debug("Stored hash was '{}'.", storedHash);
|
||||
String actualHash = getActualHash();
|
||||
logger.debug("Actual hash is '{}'.", actualHash);
|
||||
if (storedHash == null || !storedHash.equals(actualHash)) {
|
||||
logger.info("Importing new language file.");
|
||||
if (storedHash == null || !storedHash.equals(actualHash)) importLanguageFile(connection);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user