Skip to content

Commit

Permalink
Wrap program in quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
Legend-Master committed Jul 2, 2024
1 parent 33aff8e commit aafc171
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-space-in-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nsis-tauri-utils": patch
---

Fix can't launch the app sometimes if the program path contains spaces
2 changes: 1 addition & 1 deletion crates/nsis-process/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ unsafe fn run_as_user(program: &str, arguments: &str) -> bool {
lpAttributeList: attribute_list,
};
let mut process_info: PROCESS_INFORMATION = mem::zeroed();
let mut command_line = program.to_owned();
let mut command_line = "\"".to_owned() + program + "\"";
if !arguments.is_empty() {
command_line.push(' ');
command_line.push_str(arguments);
Expand Down

0 comments on commit aafc171

Please sign in to comment.