diff --git a/StabilityMatrix.Core/Services/ImageIndexService.cs b/StabilityMatrix.Core/Services/ImageIndexService.cs index a7bffe73..b5d795e9 100644 --- a/StabilityMatrix.Core/Services/ImageIndexService.cs +++ b/StabilityMatrix.Core/Services/ImageIndexService.cs @@ -38,6 +38,10 @@ public class ImageIndexService : IImageIndexService public async Task RefreshIndex(string subPath = "") { var imagesDir = settingsManager.ImagesDirectory; + if (!imagesDir.Exists) + { + return; + } // Start var stopwatch = Stopwatch.StartNew();