mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Core - Fixed crash on startup if workshop folder is missing
Updating - Properly delay auto-update check until the UI shows,
This commit is contained in:
1 parent
cf10193bd2
commit
0b6bf5685e
9 files changed
+58
-32
No files matched your search
@@ -179,12 +179,26 @@ public class WorkshopService : IWorkshopService
|
||||
{
|
||||
if (_initialized)
|
||||
throw new ArtemisWorkshopException("Workshop service is already initialized");
|
||||
|
||||
RemoveOrphanedFiles();
|
||||
_pluginManagementService.AdditionalPluginDirectories.AddRange(GetInstalledEntries().Where(e => e.EntryType == EntryType.Plugin).Select(e => e.GetReleaseDirectory()));
|
||||
_initialized = true;
|
||||
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(Constants.WorkshopFolder))
|
||||
Directory.CreateDirectory(Constants.WorkshopFolder);
|
||||
|
||||
RemoveOrphanedFiles();
|
||||
|
||||
_pluginManagementService.AdditionalPluginDirectories.AddRange(GetInstalledEntries()
|
||||
.Where(e => e.EntryType == EntryType.Plugin)
|
||||
.Select(e => e.GetReleaseDirectory()));
|
||||
|
||||
_initialized = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.Error(e, "Failed to initialize workshop service");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void RemoveOrphanedFiles()
|
||||
{
|
||||
List<InstalledEntry> entries = GetInstalledEntries();
|
||||
|
||||
Reference in new issue
Block a user