diff options
| author | Stepan Goremykin <goremukin@gmail.com> | 2023-10-12 20:11:16 +0200 |
|---|---|---|
| committer | Stepan Goremykin <goremukin@gmail.com> | 2023-10-12 20:11:16 +0200 |
| commit | 8d7e4229ca694d8222cd7b97519b63a5c79f770b (patch) | |
| tree | 81def03b33fb5bb737467c2f92a289e17fb9a53d /Emby.Server.Implementations/IO/ManagedFileSystem.cs | |
| parent | 96c3bde3463ad0457d894ed532093ed28e868ba8 (diff) | |
| parent | 075b828cbf42804439fd847b5ae3701061906fda (diff) | |
Merge branch 'master' into fix-resharper-warnings
# Conflicts:
# Emby.Server.Implementations/Net/SocketFactory.cs
# RSSDP/SsdpCommunicationsServer.cs
# RSSDP/SsdpDeviceLocator.cs
# RSSDP/SsdpDevicePublisher.cs
Diffstat (limited to 'Emby.Server.Implementations/IO/ManagedFileSystem.cs')
| -rw-r--r-- | Emby.Server.Implementations/IO/ManagedFileSystem.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index 79eca4022..c380d67db 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -103,15 +103,17 @@ namespace Emby.Server.Implementations.IO return filePath; } + var filePathSpan = filePath.AsSpan(); + // relative path if (firstChar == '\\') { - filePath = filePath.Substring(1); + filePathSpan = filePathSpan.Slice(1); } try { - return Path.GetFullPath(Path.Combine(folderPath, filePath)); + return Path.GetFullPath(Path.Join(folderPath, filePathSpan)); } catch (ArgumentException) { |
