mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-19 15:14:25 +01:00
Add a try-catch when scanning for mods.
This commit is contained in:
parent
e21c9fb6d1
commit
792a04337f
1 changed files with 23 additions and 13 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System.Security.AccessControl;
|
||||||
using Penumbra.Communication;
|
using Penumbra.Communication;
|
||||||
using Penumbra.Mods.Editor;
|
using Penumbra.Mods.Editor;
|
||||||
using Penumbra.Services;
|
using Penumbra.Services;
|
||||||
|
|
@ -310,6 +311,8 @@ public sealed class ModManager : ModStorage, IDisposable
|
||||||
/// then add the mods from the queue.
|
/// then add the mods from the queue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void ScanMods()
|
private void ScanMods()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var options = new ParallelOptions()
|
var options = new ParallelOptions()
|
||||||
{
|
{
|
||||||
|
|
@ -329,4 +332,11 @@ public sealed class ModManager : ModStorage, IDisposable
|
||||||
Mods.Add(mod);
|
Mods.Add(mod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Valid = false;
|
||||||
|
_communicator.ModDirectoryChanged.Invoke(BasePath.FullName, false);
|
||||||
|
Penumbra.Log.Error($"Could not scan for mods:\n{ex}");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue