Fix bug preventing deduplication.

This commit is contained in:
Ottermandias 2024-05-09 15:49:49 +02:00
parent 1f2f66b114
commit bbbf65eb4c
3 changed files with 5 additions and 2 deletions

View file

@ -84,9 +84,12 @@ public class DuplicateManager(ModManager modManager, SaveService saveService, Co
if (useModManager) if (useModManager)
modManager.OptionEditor.SetFiles(subMod, dict, SaveType.ImmediateSync); modManager.OptionEditor.SetFiles(subMod, dict, SaveType.ImmediateSync);
else else
{
subMod.Files = dict;
saveService.ImmediateSaveSync(new ModSaveGroup(mod.ModPath, subMod, config.ReplaceNonAsciiOnImport)); saveService.ImmediateSaveSync(new ModSaveGroup(mod.ModPath, subMod, config.ReplaceNonAsciiOnImport));
} }
} }
}
private static FullPath ChangeDuplicatePath(Mod mod, FullPath value, FullPath from, FullPath to, Utf8GamePath key, ref bool changes) private static FullPath ChangeDuplicatePath(Mod mod, FullPath value, FullPath from, FullPath to, Utf8GamePath key, ref bool changes)
{ {

View file

@ -40,7 +40,7 @@ public readonly struct ModSaveGroup : ISavable
_basePath = basePath; _basePath = basePath;
_defaultMod = container as DefaultSubMod; _defaultMod = container as DefaultSubMod;
_onlyAscii = onlyAscii; _onlyAscii = onlyAscii;
if (_defaultMod == null) if (_defaultMod != null)
{ {
_groupIdx = -1; _groupIdx = -1;
_group = null; _group = null;

View file

@ -89,7 +89,7 @@ public class CollectionSelectHeader
var collection = _resolver.PlayerCollection(); var collection = _resolver.PlayerCollection();
return CheckCollection(collection) switch return CheckCollection(collection) switch
{ {
CollectionState.Empty => (collection, "None", "The base collection is configured to use no mods.", true), CollectionState.Empty => (collection, "None", "The loaded player character is configured to use no mods.", true),
CollectionState.Selected => (collection, collection.Name, CollectionState.Selected => (collection, collection.Name,
"The collection configured to apply to the loaded player character is already selected as the current collection.", true), "The collection configured to apply to the loaded player character is already selected as the current collection.", true),
CollectionState.Available => (collection, collection.Name, CollectionState.Available => (collection, collection.Name,