mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 10:29:01 -07:00
Merge pull request #2024 from softworkz/FixExcepton
Fix IndexOutOfRangeException
This commit is contained in:
commit
9bd923e2d7
@ -923,14 +923,14 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
|
||||
if (type == typeof(Person))
|
||||
{
|
||||
var subFolderIndex = 0;
|
||||
|
||||
while (!char.IsLetterOrDigit(validFilename[subFolderIndex]))
|
||||
foreach (char c in validFilename)
|
||||
{
|
||||
subFolderIndex++;
|
||||
if (char.IsLetterOrDigit(c))
|
||||
{
|
||||
subFolderPrefix = c.ToString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
subFolderPrefix = validFilename.Substring(subFolderIndex, 1);
|
||||
}
|
||||
|
||||
var fullPath = string.IsNullOrEmpty(subFolderPrefix) ?
|
||||
|
Loading…
Reference in New Issue
Block a user