Skip to content

Commit

Permalink
fix: don't attempt to iterate directories in the VFS if it doesn't exist
Browse files Browse the repository at this point in the history
Fixes #76
  • Loading branch information
revam committed Oct 25, 2024
1 parent d06fbe8 commit 5b6da6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shokofin/Resolvers/ShokoResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _))
Expand Down

0 comments on commit 5b6da6e

Please sign in to comment.