diff options
Diffstat (limited to 'Emby.Naming/Video/Format3DParser.cs')
| -rw-r--r-- | Emby.Naming/Video/Format3DParser.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Emby.Naming/Video/Format3DParser.cs b/Emby.Naming/Video/Format3DParser.cs index eb5e71d78f..a287a2525b 100644 --- a/Emby.Naming/Video/Format3DParser.cs +++ b/Emby.Naming/Video/Format3DParser.cs @@ -52,13 +52,18 @@ namespace Emby.Naming.Video while (path.Length > 0) { var index = path.IndexOfAny(delimiters); + ReadOnlySpan<char> currentSlice; if (index == -1) { - index = path.Length - 1; + // No delimiter left, the last token is the remainder of the path + currentSlice = path; + path = default; + } + else + { + currentSlice = path[..index]; + path = path[(index + 1)..]; } - - var currentSlice = path[..index]; - path = path[(index + 1)..]; if (!foundPrefix) { |
