Enable nullable reference types for Emby.Server.Implementations

This commit is contained in:
Bond_009
2021-05-20 21:28:18 +02:00
parent e8790bfa96
commit 7e8428e588
151 changed files with 300 additions and 99 deletions

View File

@@ -140,8 +140,10 @@ namespace Emby.Server.Implementations.ScheduledTasks
previouslyFailedImages.Add(key);
var parentPath = Path.GetDirectoryName(failHistoryPath);
Directory.CreateDirectory(parentPath);
if (parentPath != null)
{
Directory.CreateDirectory(parentPath);
}
string text = string.Join('|', previouslyFailedImages);
File.WriteAllText(failHistoryPath, text);