[TC 11.55rc7] Extra Quote Appended in %P Parameter Expansion
Posted: 2025-06-20, 06:58 UTC
Bug Report: Extra Quote Appended in %P Parameter Expansion
Environment
TC 11.55rc7 (almost all previous versions dating back to much earlier releases?)
OS: Windows 11 pro 22H2 22621.4317
Windows Terminal: 10.0.22621.4317
Issue Description
When configuring a toolbar button in Total Commander to launch Windows Terminal (wt) with the active panel's path as the starting directory using the parameter -d "%P", an extra double quote (") is appended to the expanded path. This results in an invalid command (e.g., wt -d "p:\#2""), causing Windows Terminal to fail with the error:
[error 2147942667 (0x8007010b)] Could not access starting directory "p:\#2""
Using the incomplete quote parameter -d "%P (missing closing quote) unexpectedly works, generating a valid command (e.g., wt -d "p:\#2"). This configuration correctly sets the starting directory for paths with or without spaces, such as:
p:\#2 (contains #)
c:\Microsoft Shared\Phone Tools (contains spaces)
Steps to Reproduce
In Total Commander, add a toolbar button with:
Command: wt
Parameters: -d "%P"
Environment
TC 11.55rc7 (almost all previous versions dating back to much earlier releases?)
OS: Windows 11 pro 22H2 22621.4317
Windows Terminal: 10.0.22621.4317
Issue Description
When configuring a toolbar button in Total Commander to launch Windows Terminal (wt) with the active panel's path as the starting directory using the parameter -d "%P", an extra double quote (") is appended to the expanded path. This results in an invalid command (e.g., wt -d "p:\#2""), causing Windows Terminal to fail with the error:
[error 2147942667 (0x8007010b)] Could not access starting directory "p:\#2""
Using the incomplete quote parameter -d "%P (missing closing quote) unexpectedly works, generating a valid command (e.g., wt -d "p:\#2"). This configuration correctly sets the starting directory for paths with or without spaces, such as:
p:\#2 (contains #)
c:\Microsoft Shared\Phone Tools (contains spaces)
Steps to Reproduce
In Total Commander, add a toolbar button with:
Command: wt
Parameters: -d "%P"