From ba0b5e85be2466865490bc691019bd0895741781 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Sat, 12 Oct 2024 18:21:14 +0100 Subject: [PATCH] Fix some bugs --- Bloxstrap/Bootstrapper.cs | 9 +++++++-- .../UI/ViewModels/ContextMenu/ServerHistoryViewModel.cs | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index e9d8609bf..7e0b5ab1b 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -348,10 +348,15 @@ private void StartRoblox() using (var startEvent = new EventWaitHandle(false, EventResetMode.ManualReset, AppData.StartEvent)) { startEvent.Reset(); - + + string rbxLogDir = Path.Combine(Paths.LocalAppData, "Roblox\\logs"); + + if (!Directory.Exists(rbxLogDir)) + Directory.CreateDirectory(rbxLogDir); + var logWatcher = new FileSystemWatcher() { - Path = Path.Combine(Paths.LocalAppData, "Roblox\\logs"), + Path = rbxLogDir, Filter = "*.log", EnableRaisingEvents = true }; diff --git a/Bloxstrap/UI/ViewModels/ContextMenu/ServerHistoryViewModel.cs b/Bloxstrap/UI/ViewModels/ContextMenu/ServerHistoryViewModel.cs index f48e534ac..1737f1f3b 100644 --- a/Bloxstrap/UI/ViewModels/ContextMenu/ServerHistoryViewModel.cs +++ b/Bloxstrap/UI/ViewModels/ContextMenu/ServerHistoryViewModel.cs @@ -36,7 +36,7 @@ private async void LoadData() if (entries.Any()) { - string universeIds = String.Join(',', entries.GroupBy(x => x.UniverseId).Select(x => x.First())); + string universeIds = String.Join(',', entries.Select(x => x.UniverseId).Distinct()); try {