From da0de06ab6749c2aa56d86b210561fec84d8237e Mon Sep 17 00:00:00 2001 From: Gareth Date: Sat, 19 Aug 2023 20:59:40 +0100 Subject: [PATCH] Fix a bug where opening a non-Rimworld project causes Rider to crash while looking for the Rimwowrld game folder --- gradle.properties | 2 +- src/dotnet/ReSharperPlugin.RimworldDev/ScopeHelper.cs | 1 + src/rider/main/resources/META-INF/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5e0e3d2..4a7913c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ DotnetPluginId=ReSharperPlugin.RimworldDev DotnetSolution=ReSharperPlugin.RimworldDev.sln RiderPluginId=com.jetbrains.rider.plugins.rimworlddev -PluginVersion=2023.1.2 +PluginVersion=2023.1.3 BuildConfiguration=Release diff --git a/src/dotnet/ReSharperPlugin.RimworldDev/ScopeHelper.cs b/src/dotnet/ReSharperPlugin.RimworldDev/ScopeHelper.cs index b20b069..f1b9eff 100644 --- a/src/dotnet/ReSharperPlugin.RimworldDev/ScopeHelper.cs +++ b/src/dotnet/ReSharperPlugin.RimworldDev/ScopeHelper.cs @@ -83,6 +83,7 @@ private static async void AddRef(ISolution solution) for (var i = 0; i < 5; i++) { currentDirectory = currentDirectory.Parent; + if (currentDirectory.Exists == FileSystemPath.Existence.Missing) break; // If we spot UnityPlayer.dll, we're in the correct directory, we'll either find our Assembly-CSharp.dll // relative to here or not at all diff --git a/src/rider/main/resources/META-INF/plugin.xml b/src/rider/main/resources/META-INF/plugin.xml index 8d2e3fc..30993b8 100644 --- a/src/rider/main/resources/META-INF/plugin.xml +++ b/src/rider/main/resources/META-INF/plugin.xml @@ -1,7 +1,7 @@ com.jetbrains.rider.plugins.rimworlddev Rimworld Development Environment - 2023.1.2 + 2023.1.3 Garethp com.intellij.modules.rider