summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs')
-rw-r--r--modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs b/modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs
index d86a77d222..d5c3a92351 100644
--- a/modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs
+++ b/modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs
@@ -7,7 +7,7 @@ namespace GodotTools.Core
{
public static class StringExtensions
{
- private static readonly string _driveRoot = Path.GetPathRoot(Environment.CurrentDirectory);
+ private static readonly string _driveRoot = Path.GetPathRoot(Environment.CurrentDirectory)!;
public static string RelativeToPath(this string path, string dir)
{
@@ -26,9 +26,6 @@ namespace GodotTools.Core
public static string NormalizePath(this string path)
{
- if (string.IsNullOrEmpty(path))
- return path;
-
bool rooted = path.IsAbsolutePath();
path = path.Replace('\\', '/');