diff options
| author | Cody Robibero <cody@robibe.ro> | 2023-09-22 09:06:34 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-22 09:06:34 -0600 |
| commit | 7958a2fd15c756f77c5f8629f2c193f10fd29881 (patch) | |
| tree | b77bc5c72bdcbccb94e39546473af74d893eee62 /Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs | |
| parent | 3a2799e61b3aa1fcda0d06531d455944e78c581c (diff) | |
| parent | b8f42573c42b63937433ef12e5948275192acde4 (diff) | |
Merge pull request #10218 from Bond-009/librarymonitor
Diffstat (limited to 'Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs')
| -rw-r--r-- | Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs b/Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs index c2aab3879..5776c7a7c 100644 --- a/Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs +++ b/Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs @@ -8,24 +8,17 @@ namespace Emby.Server.Implementations.IO { public class MbLinkShortcutHandler : IShortcutHandler { - private readonly IFileSystem _fileSystem; - - public MbLinkShortcutHandler(IFileSystem fileSystem) - { - _fileSystem = fileSystem; - } - public string Extension => ".mblink"; public string? Resolve(string shortcutPath) { ArgumentException.ThrowIfNullOrEmpty(shortcutPath); - if (string.Equals(Path.GetExtension(shortcutPath), ".mblink", StringComparison.OrdinalIgnoreCase)) + if (Path.GetExtension(shortcutPath.AsSpan()).Equals(".mblink", StringComparison.OrdinalIgnoreCase)) { var path = File.ReadAllText(shortcutPath); - return _fileSystem.NormalizePath(path); + return Path.TrimEndingDirectorySeparator(path); } return null; |
