From 9e086962dc91c0303b2b055e7129291b7e9869f1 Mon Sep 17 00:00:00 2001 From: "waffle.lord" Date: Wed, 15 Nov 2023 09:57:27 -0500 Subject: [PATCH] add drive root check, version bump --- SPTInstaller/Helpers/FileHelper.cs | 9 ++++++++- SPTInstaller/SPTInstaller.csproj | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/SPTInstaller/Helpers/FileHelper.cs b/SPTInstaller/Helpers/FileHelper.cs index 4fd5cbc..10fd19a 100644 --- a/SPTInstaller/Helpers/FileHelper.cs +++ b/SPTInstaller/Helpers/FileHelper.cs @@ -148,6 +148,7 @@ public static class FileHelper { EndsWith = 0, Contains = 1, + DriveRoot = 2 } public static bool CheckPathForProblemLocations(string path, out string detectedName) @@ -162,6 +163,7 @@ public static class FileHelper { "NextCloud", PathCheckType.Contains }, { "DropBox", PathCheckType.Contains }, { "Google", PathCheckType.Contains }, + { "Drive Root", PathCheckType.DriveRoot} }; foreach (var name in problemNames) @@ -182,7 +184,12 @@ public static class FileHelper return true; } break; - default: + case PathCheckType.DriveRoot: + if (Regex.Match(path.ToLower(), @"^\w:(\\|\/)$").Success) + { + detectedName = name.Key; + return true; + } break; } } diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj index 1f955e6..f66237e 100644 --- a/SPTInstaller/SPTInstaller.csproj +++ b/SPTInstaller/SPTInstaller.csproj @@ -9,8 +9,8 @@ icon.ico Assets\icon.ico Debug;Release;TEST - 2.20 - 2.20 + 2.21 + 2.21 SPT-AKI