1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-24 22:36:19 -04:00

Fixed: Normalize unicode characters when comparing paths for equality

Closes #6657
This commit is contained in:
Mark McDowall
2024-11-03 16:22:32 -08:00
committed by Mark McDowall
parent 675e3cd38a
commit ceeec091f8
3 changed files with 16 additions and 2 deletions
@@ -54,6 +54,10 @@ namespace NzbDrone.Common.Extensions
public static bool PathEquals(this string firstPath, string secondPath, StringComparison? comparison = null)
{
// Normalize paths to ensure unicode characters are represented the same way
firstPath = firstPath.Normalize();
secondPath = secondPath?.Normalize();
if (!comparison.HasValue)
{
comparison = DiskProviderBase.PathStringComparison;