Skip to content

Commit 04f1b46

Browse files
Enhance the command preprocessor
1 parent c6facbd commit 04f1b46

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

mcp_nexus/Utilities/WslPathConverter.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,15 @@ public Dictionary<string, string> LoadFstabMappings()
111111
string? root = null;
112112
if (src.Length >= 2 && src[1] == ':' && char.IsLetter(src[0]))
113113
{
114-
// e.g., C:
115-
root = char.ToUpperInvariant(src[0]) + ":\\";
114+
// Handle both "C:" and "C:/some/path"
115+
root = src.Replace('/', '\\');
116+
// Ensure drive letter is uppercase
117+
root = char.ToUpperInvariant(root[0]) + root.Substring(1);
118+
// Ensure backslash after drive letter
119+
if (root.Length == 2 || (root.Length > 2 && root[2] != '\\'))
120+
{
121+
root = root.Substring(0, 2) + '\\' + root.Substring(2).TrimStart('\\');
122+
}
116123
}
117124
else if (src.StartsWith("//") || src.StartsWith("\\\\"))
118125
{

mcp_nexus/mcp_nexus.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
88
<WarningsAsErrors />
9-
<Version>1.0.6.81</Version>
10-
<AssemblyVersion>1.0.6.81</AssemblyVersion>
11-
<FileVersion>1.0.6.81</FileVersion>
9+
<Version>1.0.6.82</Version>
10+
<AssemblyVersion>1.0.6.82</AssemblyVersion>
11+
<FileVersion>1.0.6.82</FileVersion>
1212
<Product>MCP Nexus</Product>
1313
<Description>Model Context Protocol Server for Windows Debugging Tools</Description>
1414
<Company>CapulusCodeNinja</Company>

0 commit comments

Comments
 (0)