diff --git a/Penumbra/Mods/CollectionManager.cs b/Penumbra/Mods/CollectionManager.cs index 629ef8ba..1ad36af6 100644 --- a/Penumbra/Mods/CollectionManager.cs +++ b/Penumbra/Mods/CollectionManager.cs @@ -85,7 +85,7 @@ namespace Penumbra.Mods public bool AddCollection( string name, Dictionary< string, ModSettings > settings ) { var nameFixed = name.RemoveInvalidPathSymbols().ToLowerInvariant(); - if( Collections.Values.Any( c => c.Name.RemoveInvalidPathSymbols().ToLowerInvariant() == nameFixed ) ) + if( nameFixed == string.Empty || Collections.Values.Any( c => c.Name.RemoveInvalidPathSymbols().ToLowerInvariant() == nameFixed ) ) { PluginLog.Warning( $"The new collection {name} would lead to the same path as one that already exists." ); return false; diff --git a/Penumbra/UI/MenuTabs/TabCollections.cs b/Penumbra/UI/MenuTabs/TabCollections.cs index a5b9436c..6039cede 100644 --- a/Penumbra/UI/MenuTabs/TabCollections.cs +++ b/Penumbra/UI/MenuTabs/TabCollections.cs @@ -1,11 +1,9 @@ -using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using Dalamud.Interface; using Dalamud.Plugin; using ImGuiNET; -using Penumbra.Interop; using Penumbra.Mod; using Penumbra.Mods; using Penumbra.Util; @@ -31,7 +29,7 @@ namespace Penumbra.UI private void UpdateNames() { _collections = _manager.Collections.Collections.Values.Prepend( ModCollection.Empty ).ToArray(); - _collectionNames = string.Join( "\0", _collections.Skip( 1 ).Select( c => c.Name ) ); + _collectionNames = string.Join( "\0", _collections.Skip( 1 ).Select( c => c.Name ) ) + '\0'; _collectionNamesWithNone = "None\0" + _collectionNames; UpdateIndices(); }