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);
|
logger.debug("Stored hash was '{}'.", storedHash);
|
||||||
String actualHash = getActualHash();
|
String actualHash = getActualHash();
|
||||||
logger.debug("Actual hash is '{}'.", actualHash);
|
logger.debug("Actual hash is '{}'.", actualHash);
|
||||||
logger.info("Importing new language file.");
|
if (storedHash == null || !storedHash.equals(actualHash)) {
|
||||||
if (storedHash == null || !storedHash.equals(actualHash)) importLanguageFile(connection);
|
logger.info("Importing new language file.");
|
||||||
logger.debug("Saving new hash in database.");
|
importLanguageFile(connection);
|
||||||
saveProperty(HASH_KEY, actualHash);
|
logger.debug("Saving new hash in database.");
|
||||||
|
saveProperty(HASH_KEY, actualHash);
|
||||||
|
}
|
||||||
} catch (SQLException | IOException | NoSuchAlgorithmException e) {
|
} catch (SQLException | IOException | NoSuchAlgorithmException e) {
|
||||||
logger.error("Cannot update the languages right now. Reason: {}", e.getMessage());
|
logger.error("Cannot update the languages right now. Reason: {}", e.getMessage());
|
||||||
if (storedHash == null || storedHash.isEmpty()) System.exit(7);
|
if (storedHash == null || storedHash.isEmpty()) System.exit(7);
|
||||||
|
Loading…
Reference in New Issue
Block a user