1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-26 22:46:53 -04:00

Fixed: Normalize unicode characters when comparing paths for equality

(cherry picked from commit ceeec091f85d0094e07537b7f62f18292655a710)
This commit is contained in:
Mark McDowall
2024-11-03 16:22:32 -08:00
committed by Bogdan
parent 2429dd91c6
commit ea86d14ca7
3 changed files with 16 additions and 2 deletions
@@ -55,6 +55,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;