Fix empty collection building cache after last change.

This commit is contained in:
Ottermandias 2021-12-13 17:30:58 +01:00
parent ece034cafc
commit cd1faf5860

View file

@ -62,13 +62,13 @@ namespace Penumbra.Mods
return; return;
} }
if( DefaultCollection.Cache == null ) if( DefaultCollection.Name != ModCollection.Empty.Name && DefaultCollection.Cache == null )
DefaultCollection.CreateCache( _manager.TempPath, _manager.StructuredMods.AllMods( _manager.Config.SortFoldersFirst )); DefaultCollection.CreateCache( _manager.TempPath, _manager.StructuredMods.AllMods( _manager.Config.SortFoldersFirst ));
if( ForcedCollection.Cache == null ) if( ForcedCollection.Name != ModCollection.Empty.Name && ForcedCollection.Cache == null )
ForcedCollection.CreateCache( _manager.TempPath, _manager.StructuredMods.AllMods( _manager.Config.SortFoldersFirst ) ); ForcedCollection.CreateCache( _manager.TempPath, _manager.StructuredMods.AllMods( _manager.Config.SortFoldersFirst ) );
foreach (var (_, collection) in CharacterCollection.Where( kvp => kvp.Value.Cache == null )) foreach (var (_, collection) in CharacterCollection.Where( kvp => kvp.Value.Name != ModCollection.Empty.Name && kvp.Value.Cache == null ))
collection.CreateCache( _manager.TempPath, _manager.StructuredMods.AllMods( _manager.Config.SortFoldersFirst ) ); collection.CreateCache( _manager.TempPath, _manager.StructuredMods.AllMods( _manager.Config.SortFoldersFirst ) );
} }