Skip to content

Commit 411a021

Browse files
authored
Fix valid folder path detection
Change disallowed character from backslash to forward slash (bug?) and improve error message.
1 parent 5f18e96 commit 411a021

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Main.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,16 @@ private bool ValidateFolderPath(string? folderPath)
100100
{
101101
return false;
102102
}
103-
if (!_IsValidPath(folderPath) || folderPath.Contains("\""))
103+
if (!_IsValidPath(folderPath))
104104
{
105105
Context.API.ShowMsgError("Invalid PATH Value", $"\"{folderPath}\" is not a valid folder path - verify that the path is correct and valid");
106106
return false;
107107
}
108+
if (folderPath.Contains("/""))
109+
{
110+
Context.API.ShowMsgError("Invalid PATH Value", "backslashes (\"/\") are not allowed in folder path - replace them with forward slashes.");
111+
return false;
112+
}
108113
if (!IsDirectory(folderPath))
109114
{
110115
Context.API.ShowMsg("WARNING: This is a file path", $"PATH is for folder paths, but \"{folderPath}\" is a file path. File paths are ignored in PATH." +

0 commit comments

Comments
 (0)