diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-10-08 14:07:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-08 14:07:30 +0200 |
| commit | 0b31997b2f5fa3245f80711d703a4247cfbb0363 (patch) | |
| tree | 357cc2919e8eacc33a8defdb19c06f89836ea96e /Emby.Server.Implementations/IO/ManagedFileSystem.cs | |
| parent | cf806ddcaade30a2a656b4974f12b9453c8d21e7 (diff) | |
| parent | b176beb88e22a36cc056439ac2a4df4fbe68f2c1 (diff) | |
Merge pull request #10348 from Bond-009/strings
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 18b00ce0b..4178936ce 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) { |
