Skip to content

Commit 6709211

Browse files
committed
Dont wrap filtered text in path. The translation routine already checks if its looking at a path
1 parent 8ae631c commit 6709211

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/cascadia/TerminalControl/ControlCore.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,11 +1443,8 @@ namespace winrt::Microsoft::Terminal::Control::implementation
14431443
using namespace ::Microsoft::Console::Utils;
14441444

14451445
auto filtered = FilterStringForPaste(hstr, CarriageReturnNewline | ControlCodes);
1446-
std::filesystem::path path{ filtered };
1447-
1448-
if (!path.empty() && _settings->PathTranslationStyle() != PathTranslationStyle::None)
1446+
if (!filtered.empty() && _settings->PathTranslationStyle() != PathTranslationStyle::None)
14491447
{
1450-
filtered = path.wstring();
14511448
// Explorer puts paths wrapped in double quotes on the clipboard. The translation routine expects it to be without quotes.
14521449
if (!filtered.empty() && filtered.front() == '\"')
14531450
{

0 commit comments

Comments
 (0)