From 1ba783dea607ca8132be8aee02d7081d0174aa16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matth=C3=A4us=20G=2E=20Chajdas?= Date: Tue, 7 Feb 2017 20:46:12 +0100 Subject: [PATCH] Remove quotes from the exePath. This solves copy/pasting a path from explorer using "Copy as path", which always adds quotes. --- renderdocui/Windows/Dialogs/CaptureDialog.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/renderdocui/Windows/Dialogs/CaptureDialog.cs b/renderdocui/Windows/Dialogs/CaptureDialog.cs index 96537e4ac..c7d2ddcd3 100644 --- a/renderdocui/Windows/Dialogs/CaptureDialog.cs +++ b/renderdocui/Windows/Dialogs/CaptureDialog.cs @@ -729,6 +729,13 @@ namespace renderdocui.Windows.Dialogs private void exePath_TextChanged(object sender, EventArgs e) { + // This is likely due to someone pasting a full path copied using + // copy path. Removing the quotes is safe in any case + if (exePath.Text.StartsWith ("\"") && exePath.Text.EndsWith ("\"") && exePath.Text.Length > 2) + { + exePath.Text = exePath.Text.Substring(1, exePath.Text.Length - 2); + } + UpdateWorkDirHint(); UpdateGlobalHook(); }