mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
fix upgrade error message if no managed persistence config exists (#5202)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This commit is contained in:
+6
-1
@@ -59,7 +59,12 @@ public class PersistenceUpgrader implements Upgrader {
|
||||
|
||||
Path persistenceJsonDatabasePath = userdataPath
|
||||
.resolve(Path.of("jsondb", "org.openhab.core.persistence.PersistenceServiceConfiguration.json"));
|
||||
logger.info("Setting default strategy on persistence configurations without strategy '{}'",
|
||||
if (Files.notExists(persistenceJsonDatabasePath)) {
|
||||
// No managed persistence configurations, so no need to upgrade
|
||||
return true;
|
||||
}
|
||||
|
||||
logger.info("Setting default strategy on managed persistence configurations without strategy '{}'",
|
||||
persistenceJsonDatabasePath);
|
||||
|
||||
if (!Files.isWritable(persistenceJsonDatabasePath)) {
|
||||
|
||||
Reference in New Issue
Block a user