From 5b6da6e7c0acf0a8d697282377a376a53bf7ff5c Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Fri, 25 Oct 2024 22:29:39 +0200 Subject: [PATCH] fix: don't attempt to iterate directories in the VFS if it doesn't exist Fixes #76 --- Shokofin/Resolvers/ShokoResolver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shokofin/Resolvers/ShokoResolver.cs b/Shokofin/Resolvers/ShokoResolver.cs index 1c7b1199..b25fb003 100644 --- a/Shokofin/Resolvers/ShokoResolver.cs +++ b/Shokofin/Resolvers/ShokoResolver.cs @@ -131,7 +131,7 @@ NamingOptions namingOptions if (parent.IsTopParent) { var createMovies = collectionType is CollectionType.movies || (collectionType is null && Plugin.Instance.Configuration.SeparateMovies); var pathsToRemoveBag = new ConcurrentBag<(string, bool)>(); - var items = FileSystem.GetDirectories(vfsPath) + var items = (FileSystem.DirectoryExists(vfsPath) ? FileSystem.GetDirectories(vfsPath) : []) .AsParallel() .SelectMany(dirInfo => { if (!dirInfo.Name.TryGetAttributeValue(ShokoSeriesId.Name, out var seriesId) || !int.TryParse(seriesId, out _))