mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 14:23:43 +01:00
Wait for saves to finish when the file might be read immediately after saving.
This commit is contained in:
parent
a9f36c6aef
commit
bb742463e9
6 changed files with 10 additions and 9 deletions
|
|
@ -82,7 +82,7 @@ public class DuplicateManager
|
|||
{
|
||||
var sub = (SubMod)subMod;
|
||||
sub.FileData = dict;
|
||||
_saveService.ImmediateSave(new ModSaveGroup(mod, groupIdx));
|
||||
_saveService.ImmediateSaveSync(new ModSaveGroup(mod, groupIdx));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ public partial class ModCreator
|
|||
return;
|
||||
|
||||
_saveService.SaveAllOptionGroups(mod, false);
|
||||
_saveService.ImmediateSave(new ModSaveGroup(mod.ModPath, mod.Default));
|
||||
_saveService.ImmediateSaveSync(new ModSaveGroup(mod.ModPath, mod.Default));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ public partial class ModCreator
|
|||
DefaultSettings = defaultSettings,
|
||||
};
|
||||
group.PrioritizedOptions.AddRange(subMods.OfType<SubMod>().Select((s, idx) => (s, idx)));
|
||||
_saveService.ImmediateSave(new ModSaveGroup(baseFolder, group, index));
|
||||
_saveService.ImmediateSaveSync(new ModSaveGroup(baseFolder, group, index));
|
||||
break;
|
||||
}
|
||||
case GroupType.Single:
|
||||
|
|
@ -274,7 +274,7 @@ public partial class ModCreator
|
|||
DefaultSettings = defaultSettings,
|
||||
};
|
||||
group.OptionData.AddRange(subMods.OfType<SubMod>());
|
||||
_saveService.ImmediateSave(new ModSaveGroup(baseFolder, group, index));
|
||||
_saveService.ImmediateSaveSync(new ModSaveGroup(baseFolder, group, index));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -321,7 +321,7 @@ public partial class ModCreator
|
|||
}
|
||||
|
||||
IncorporateMetaChanges(mod.Default, directory, true);
|
||||
_saveService.ImmediateSave(new ModSaveGroup(mod, -1));
|
||||
_saveService.ImmediateSaveSync(new ModSaveGroup(mod, -1));
|
||||
}
|
||||
|
||||
/// <summary> Return the name of a new valid directory based on the base directory and the given name. </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue