diff --git a/JL.Windows/GUI/EditDictionaryWindow.xaml.cs b/JL.Windows/GUI/EditDictionaryWindow.xaml.cs index 560971e1..5166b31c 100644 --- a/JL.Windows/GUI/EditDictionaryWindow.xaml.cs +++ b/JL.Windows/GUI/EditDictionaryWindow.xaml.cs @@ -42,8 +42,9 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) string fullPath = Path.GetFullPath(path, Utils.ApplicationPath); if (string.IsNullOrWhiteSpace(path) - || (!Directory.Exists(fullPath) && !File.Exists(fullPath)) - || (_dict.Path != path && DictUtils.Dicts.Values.Any(dict => dict.Path == path))) + || (_dict.Path != path + && ((!Directory.Exists(fullPath) && !File.Exists(fullPath)) + || DictUtils.Dicts.Values.Any(dict => dict.Path == path)))) { TextBlockPath.BorderBrush = Brushes.Red; isValid = false; diff --git a/JL.Windows/GUI/EditFrequencyWindow.xaml.cs b/JL.Windows/GUI/EditFrequencyWindow.xaml.cs index d90f3f97..ecffac2b 100644 --- a/JL.Windows/GUI/EditFrequencyWindow.xaml.cs +++ b/JL.Windows/GUI/EditFrequencyWindow.xaml.cs @@ -39,8 +39,9 @@ private void SaveButton_Click(object sender, RoutedEventArgs e) string fullPath = Path.GetFullPath(path, Utils.ApplicationPath); if (string.IsNullOrWhiteSpace(path) - || (!Directory.Exists(fullPath) && !File.Exists(fullPath)) - || (_freq.Path != path && FreqUtils.FreqDicts.Values.Any(dict => dict.Path == path))) + || (_freq.Path != path + && ((!Directory.Exists(fullPath) && !File.Exists(fullPath)) + || FreqUtils.FreqDicts.Values.Any(dict => dict.Path == path)))) { TextBlockPath.BorderBrush = Brushes.Red; isValid = false;