diff options
| author | Patrick Barron <barronpm@gmail.com> | 2023-10-10 12:00:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-10 12:00:45 -0400 |
| commit | 1ce49b4a047c4d509ffe327afd2c6fca1e8a328c (patch) | |
| tree | 646921daab177b4450c54eb5b3345fe7c45295a2 /Emby.Server.Implementations/IO/ManagedFileSystem.cs | |
| parent | c38fbece0328e26d9d1c7a6772cba87081c122eb (diff) | |
| parent | ba23c880f3ac5e5892a730b20ab78d8bc78d91bb (diff) | |
Merge branch 'master' into xml-parsing-cleanup
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) { |
