Merge pull request #4478 from Bond-009/chararray

Don't allocate single char arrays when possible
This commit is contained in:
Claus Vium
2020-11-15 13:48:43 +01:00
committed by GitHub
29 changed files with 57 additions and 57 deletions

View File

@@ -1033,7 +1033,7 @@ namespace Emby.Server.Implementations
else
{
// No metafile, so lets see if the folder is versioned.
metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1];
metafile = dir.Split(Path.DirectorySeparatorChar, StringSplitOptions.RemoveEmptyEntries)[^1];
int versionIndex = dir.LastIndexOf('_');
if (versionIndex != -1 && Version.TryParse(dir.Substring(versionIndex + 1), out Version parsedVersion))