Skip to content

Commit

Permalink
fix: fix migration issue for path with space
Browse files Browse the repository at this point in the history
  • Loading branch information
4o3F committed Apr 7, 2024
1 parent b5ce1c6 commit 0bfcb04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/tauri/src/cmds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ pub async fn set_custom_app_dir(app_handle: tauri::AppHandle, path: String) -> C
.arg("-Command")
.arg(
format!(
r#"Start-Process '{}' -ArgumentList 'migrate-home-dir','{}' -Verb runAs"#,
r#"Start-Process '{}' -ArgumentList 'migrate-home-dir','"{}"' -Verb runAs"#,
app_exe.as_str(),
path_str.as_str()
)
Expand Down
1 change: 1 addition & 0 deletions backend/tauri/src/core/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ mod handler {
use std::{path::PathBuf, process::Command, str::FromStr, thread, time::Duration};
use sysinfo::System;
use tauri::utils::platform::current_exe;
println!("target path {}", target_path);

let token = Token::with_current_process()?;
if let PrivilegeLevel::NotPrivileged = token.privilege_level()? {
Expand Down

0 comments on commit 0bfcb04

Please sign in to comment.