Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Dec 15, 2023
1 parent f309cb4 commit 4f6ae9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions JL.Core/Dicts/EDICT/ResourceUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ await Task.Run(async () => await JmdictLoader
File.Delete(dbPath);
}

if (useDB)
if (useDB || dbExists)
{
await Task.Run(() =>
{
Expand Down Expand Up @@ -184,7 +184,7 @@ await Task.Run(async () => await JmnedictLoader
File.Delete(dbPath);
}

if (useDB)
if (useDB || dbExists)
{
await Task.Run(() =>
{
Expand Down Expand Up @@ -232,7 +232,7 @@ await Task.Run(async () => await KanjidicLoader
File.Delete(dbPath);
}

if (useDB)
if (useDB || dbExists)
{
await Task.Run(() =>
{
Expand Down
4 changes: 3 additions & 1 deletion JL.Core/WordClass/JmdictWordClassUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ internal static async Task Initialize()
if (!File.Exists(Path.Join(Utils.ResourcesPath, "PoS.json")))
{
Dict dict = DictUtils.SingleDictTypeDicts[DictType.JMdict];
if (dict.Active)
bool useDB = dict.Options?.UseDB?.Value ?? false;

if (dict.Active && !useDB)
{
await Serialize().ConfigureAwait(false);
}
Expand Down

0 comments on commit 4f6ae9b

Please sign in to comment.