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:
committed by
Mark McDowall
parent
675e3cd38a
commit
ceeec091f8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user