mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Correct styling inconsistencies
This commit is contained in:
parent
a944352aa8
commit
3a731051ad
@ -105,7 +105,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newSubPathTrimmed = newSubPath.AsSpan().TrimEnd((char)newDirectorySeparatorChar!);
|
var newSubPathTrimmed = newSubPath.AsSpan().TrimEnd(newDirectorySeparatorChar);
|
||||||
// Ensure that the path with the old subpath removed starts with a leading dir separator
|
// Ensure that the path with the old subpath removed starts with a leading dir separator
|
||||||
int idx = oldSubPathEndsWithSeparator ? subPath.Length - 1 : subPath.Length;
|
int idx = oldSubPathEndsWithSeparator ? subPath.Length - 1 : subPath.Length;
|
||||||
newPath = string.Concat(newSubPathTrimmed, path.AsSpan(idx));
|
newPath = string.Concat(newSubPathTrimmed, path.AsSpan(idx));
|
||||||
@ -120,7 +120,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
/// <returns>The fully expanded, normalized path.</returns>
|
/// <returns>The fully expanded, normalized path.</returns>
|
||||||
public static string Canonicalize(this string path)
|
public static string Canonicalize(this string path)
|
||||||
{
|
{
|
||||||
return Path.GetFullPath(path).NormalizePath()!;
|
return Path.GetFullPath(path).NormalizePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -161,7 +161,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
|
|
||||||
separator = newSeparator;
|
separator = newSeparator;
|
||||||
|
|
||||||
return path?.NormalizePath(newSeparator);
|
return path.NormalizePath(newSeparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user