Skip to content

Commit 8df1bcf

Browse files
committed
Fix: Profile file name case insensitive
1 parent 285b3d3 commit 8df1bcf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Source/NETworkManager.Validators/ProfileFileUniqueValidator.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Globalization;
1+
using System;
2+
using System.Globalization;
23
using System.Linq;
34
using System.Windows.Controls;
45
using NETworkManager.Localization.Resources;
@@ -10,7 +11,8 @@ public class ProfileFileUniqueValidator : ValidationRule
1011
{
1112
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
1213
{
13-
return ProfileManager.ProfileFiles.Any(x => x.Name == value as string)
14+
return ProfileManager.ProfileFiles.Any(x =>
15+
string.Equals(x.Name, value as string, StringComparison.OrdinalIgnoreCase))
1416
? new ValidationResult(false, Strings.ProfileNameAlreadyExists)
1517
: ValidationResult.ValidResult;
1618
}

Website/docs/changelog/next-release.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ Release date: **xx.xx.2025**
8282

8383
## Bugfixes
8484

85+
- Fixed an issue where the profile file could be overwritten when creating a new profile file with the same name, but with another case (`Profile` exists, but `profile` is created). [#3087](https://github.com/BornToBeRoot/NETworkManager/pull/3087)
86+
- Fixed an application crash when a profile file is renamed to another case (e.g. `Profile` to `profile`) [#3087](https://github.com/BornToBeRoot/NETworkManager/pull/3087).
87+
8588
**Network Interface**
8689

8790
- Re-select the network interface after a network change or configuration update. Thanks to [@Ghislain1](https://github.com/Ghislain1) [#3004](https://github.com/BornToBeRoot/NETworkManager/pull/3004) [#2962](https://github.com/BornToBeRoot/NETworkManager/pull/2962)

0 commit comments

Comments
 (0)