diff --git a/JL.Core/Dicts/EPWING/Yomichan/EpwingYomichanLoader.cs b/JL.Core/Dicts/EPWING/Yomichan/EpwingYomichanLoader.cs index 07dcd54f..f5a8de09 100644 --- a/JL.Core/Dicts/EPWING/Yomichan/EpwingYomichanLoader.cs +++ b/JL.Core/Dicts/EPWING/Yomichan/EpwingYomichanLoader.cs @@ -15,7 +15,7 @@ public static async Task Load(Dict dict) } IEnumerable jsonFiles = Directory.EnumerateFiles(fullPath, "*_bank_*.json", SearchOption.TopDirectoryOnly) - .Where(static s => s.StartsWith("term", StringComparison.Ordinal) || s.StartsWith("kanji", StringComparison.Ordinal)); + .Where(static s => s.Contains("term", StringComparison.Ordinal) || s.Contains("kanji", StringComparison.Ordinal)); foreach (string jsonFile in jsonFiles) { diff --git a/JL.Core/Freqs/FrequencyYomichan/FrequencyYomichanLoader.cs b/JL.Core/Freqs/FrequencyYomichan/FrequencyYomichanLoader.cs index f56129d2..92db1af0 100644 --- a/JL.Core/Freqs/FrequencyYomichan/FrequencyYomichanLoader.cs +++ b/JL.Core/Freqs/FrequencyYomichan/FrequencyYomichanLoader.cs @@ -16,7 +16,7 @@ public static async Task Load(Freq freq) } IEnumerable jsonFiles = Directory.EnumerateFiles(fullPath, "*_bank_*.json", SearchOption.TopDirectoryOnly) - .Where(static s => s.StartsWith("term", StringComparison.Ordinal) || s.StartsWith("kanji", StringComparison.Ordinal)); + .Where(static s => s.Contains("term", StringComparison.Ordinal) || s.Contains("kanji", StringComparison.Ordinal)); foreach (string jsonFile in jsonFiles) { diff --git a/JL.Core/Utilities/Utils.cs b/JL.Core/Utilities/Utils.cs index 68201aa7..4b3e16a8 100644 --- a/JL.Core/Utilities/Utils.cs +++ b/JL.Core/Utilities/Utils.cs @@ -23,7 +23,7 @@ namespace JL.Core.Utilities; public static partial class Utils { - public static readonly Version JLVersion = new(2, 2, 0); + public static readonly Version JLVersion = new(2, 2, 1); public static readonly string ApplicationPath = AppContext.BaseDirectory; public static readonly string ResourcesPath = Path.Join(AppContext.BaseDirectory, "Resources"); public static readonly string ConfigPath = Path.Join(AppContext.BaseDirectory, "Config"); diff --git a/JL.Windows/GUI/AddDictionaryWindow.xaml.cs b/JL.Windows/GUI/AddDictionaryWindow.xaml.cs index 43e69e7f..efd5513a 100644 --- a/JL.Windows/GUI/AddDictionaryWindow.xaml.cs +++ b/JL.Windows/GUI/AddDictionaryWindow.xaml.cs @@ -80,7 +80,7 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) else { bool validPath = Directory.EnumerateFiles(fullPath, "*_bank_*.json", SearchOption.TopDirectoryOnly) - .Any(static s => s.StartsWith("term", StringComparison.Ordinal) || s.StartsWith("kanji", StringComparison.Ordinal)); + .Any(static s => s.Contains("term", StringComparison.Ordinal) || s.Contains("kanji", StringComparison.Ordinal)); if (!validPath) { diff --git a/JL.Windows/GUI/AddFrequencyWindow.xaml.cs b/JL.Windows/GUI/AddFrequencyWindow.xaml.cs index c49e3f0e..8251b4f2 100644 --- a/JL.Windows/GUI/AddFrequencyWindow.xaml.cs +++ b/JL.Windows/GUI/AddFrequencyWindow.xaml.cs @@ -66,7 +66,7 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) if (type is FreqType.Yomichan or FreqType.YomichanKanji) { bool validPath = Directory.EnumerateFiles(fullPath, "*_bank_*.json", SearchOption.TopDirectoryOnly) - .Any(static s => s.StartsWith("term", StringComparison.Ordinal) || s.StartsWith("kanji", StringComparison.Ordinal)); + .Any(static s => s.Contains("term", StringComparison.Ordinal) || s.Contains("kanji", StringComparison.Ordinal)); if (!validPath) { diff --git a/JL.Windows/GUI/EditDictionaryWindow.xaml.cs b/JL.Windows/GUI/EditDictionaryWindow.xaml.cs index 2f1d47aa..1955ea2a 100644 --- a/JL.Windows/GUI/EditDictionaryWindow.xaml.cs +++ b/JL.Windows/GUI/EditDictionaryWindow.xaml.cs @@ -80,7 +80,7 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) else { bool validPath = Directory.EnumerateFiles(fullPath, "*_bank_*.json", SearchOption.TopDirectoryOnly) - .Any(static s => s.StartsWith("term", StringComparison.Ordinal) || s.StartsWith("kanji", StringComparison.Ordinal)); + .Any(static s => s.Contains("term", StringComparison.Ordinal) || s.Contains("kanji", StringComparison.Ordinal)); if (!validPath) { diff --git a/JL.Windows/GUI/EditFrequencyWindow.xaml.cs b/JL.Windows/GUI/EditFrequencyWindow.xaml.cs index 7d984ac0..56782d57 100644 --- a/JL.Windows/GUI/EditFrequencyWindow.xaml.cs +++ b/JL.Windows/GUI/EditFrequencyWindow.xaml.cs @@ -67,7 +67,7 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) if (_freq.Type is FreqType.Yomichan or FreqType.YomichanKanji) { bool hasValidFiles = Directory.EnumerateFiles(fullPath, "*_bank_*.json", SearchOption.TopDirectoryOnly) - .Any(static s => s.StartsWith("term", StringComparison.Ordinal) || s.StartsWith("kanji", StringComparison.Ordinal)); + .Any(static s => s.Contains("term", StringComparison.Ordinal) || s.Contains("kanji", StringComparison.Ordinal)); if (!hasValidFiles) {