diff options
| author | herby2212 <12448284+herby2212@users.noreply.github.com> | 2023-10-21 01:20:59 +0200 |
|---|---|---|
| committer | herby2212 <12448284+herby2212@users.noreply.github.com> | 2023-10-21 01:20:59 +0200 |
| commit | 27ceee8b6c70570129b917d8467a3a5bb058eab4 (patch) | |
| tree | 49309bf28c40f19a2cdc96a3ac051e88f30f14b1 /Emby.Server.Implementations/IO/ManagedFileSystem.cs | |
| parent | e8a05ad996ab35909cd5928d49c4e8c46e9985d5 (diff) | |
| parent | df7032b09e720cf07169514433557edf22922d0c (diff) | |
update to current master to resolve merge conflict
Diffstat (limited to 'Emby.Server.Implementations/IO/ManagedFileSystem.cs')
| -rw-r--r-- | Emby.Server.Implementations/IO/ManagedFileSystem.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index 18b00ce0b..c380d67db 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -91,7 +91,7 @@ namespace Emby.Server.Implementations.IO } // unc path - if (filePath.StartsWith("\\\\", StringComparison.Ordinal)) + if (filePath.StartsWith(@"\\", StringComparison.Ordinal)) { return filePath; } @@ -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) { |
