From 5882006ee7657a19e802c4990be6849b847d71a3 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Sat, 7 Mar 2026 21:23:16 +0100 Subject: Optimize migrations --- Emby.Server.Implementations/IO/ManagedFileSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Emby.Server.Implementations/IO') diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index 4d68cb4444..199407044b 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -586,6 +586,12 @@ namespace Emby.Server.Implementations.IO /// public virtual IEnumerable GetFiles(string path, string searchPattern, IReadOnlyList? extensions, bool enableCaseSensitiveExtensions, bool recursive = false) { + if (!Directory.Exists(path)) + { + _logger.LogWarning("Directory does not exist: {Path}", path); + return []; + } + var enumerationOptions = GetEnumerationOptions(recursive); // On linux and macOS the search pattern is case-sensitive -- cgit v1.2.3