From 3168e176031a61215be542595ba90ca51f8f2d97 Mon Sep 17 00:00:00 2001 From: Austin Bennett <157770486+auggiebennett@users.noreply.github.com> Date: Wed, 18 Sep 2024 20:59:54 -0500 Subject: [PATCH] Added quotes for cmd (#1806) * Added quotes for cmd * Add change file --------- Co-authored-by: Tony --- .changes/deep-link-space-in-path.md | 5 +++++ plugins/deep-link/src/lib.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/deep-link-space-in-path.md diff --git a/.changes/deep-link-space-in-path.md b/.changes/deep-link-space-in-path.md new file mode 100644 index 00000000..53fa8822 --- /dev/null +++ b/.changes/deep-link-space-in-path.md @@ -0,0 +1,5 @@ +--- +"deep-link": patch +--- + +Fix fails to start when having spaces in the main binary path on Windows diff --git a/plugins/deep-link/src/lib.rs b/plugins/deep-link/src/lib.rs index ea265504..bd53ebc1 100644 --- a/plugins/deep-link/src/lib.rs +++ b/plugins/deep-link/src/lib.rs @@ -278,7 +278,7 @@ mod imp { let cmd_reg = CURRENT_USER.create(format!("{key_base}\\shell\\open\\command"))?; - cmd_reg.set_string("", &format!("{} \"%1\"", &exe))?; + cmd_reg.set_string("", &format!("\"{}\" \"%1\"", &exe))?; Ok(()) }