diff --git a/spv3/loader/src/Install.cs b/spv3/loader/src/Install.cs index 61e7392e0..8fdffb5c6 100644 --- a/spv3/loader/src/Install.cs +++ b/spv3/loader/src/Install.cs @@ -370,14 +370,20 @@ public void ValidateTarget(string path) try { var exists = Directory.Exists(path); - var rootExists = Directory.Exists(Path.GetPathRoot(path)); + var root = Path.GetPathRoot(path); + var rootExists = Directory.Exists(root); if (!exists && rootExists) { while (!Directory.Exists(path)) { - path = Directory.GetParent(path).Name; - if (path == CurrentDirectory) return; + path = Directory.GetParent(path).FullName; + if (path == CurrentDirectory) + { + Status = "Enter a valid path."; + CanInstall = false; + return; + } } }