Skip to content

Commit

Permalink
fix: file being used before legacy storage init
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Oct 11, 2024
1 parent 9db780b commit ae37845
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public boolean initializeFailed()
return initializeFailed;
}

private boolean initializeFailed;
private boolean initializeFailed = false;

private URI getAbsoulteURI(String path)
{
Expand Down Expand Up @@ -53,6 +53,8 @@ public DirectoryStorage(String directoryBaseName)
this.initializeFailed = true;
}
}

this.initializeFailed = false;
}

public File[] getFiles(String pattern)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,11 @@ private void migrateFromLegacyStorage()
{
logger.info("Migrating from legacy skill configuration...");
var storage = new LegacyReadonlyConfigurationStorage();
var file = storage.file();

if (!file.exists())
{
logger.info("Legacy skill configuration doesn't exist, ignoring...");
return;
}

storage.initializeStorage();

var file = storage.file();

var storing = storage.getStoring();
if (storing == null)
{
Expand Down

0 comments on commit ae37845

Please sign in to comment.