🐛 移除可能存在的引号
This commit is contained in:
@@ -512,9 +512,12 @@ impl DownloadManager {
|
|||||||
async fn install_package(&self, task: &InstallTask) -> Result<(), String> {
|
async fn install_package(&self, task: &InstallTask) -> Result<(), String> {
|
||||||
println!("开始安装包: {}", task.filepath);
|
println!("开始安装包: {}", task.filepath);
|
||||||
|
|
||||||
|
// 移除可能存在的引号
|
||||||
|
let filepath = task.filepath.trim_matches('"');
|
||||||
|
|
||||||
let output = Command::new("pkexec")
|
let output = Command::new("pkexec")
|
||||||
.arg("ssinstall")
|
.arg("ssinstall")
|
||||||
.arg(&task.filepath)
|
.arg(filepath)
|
||||||
.arg("--delete-after-install")
|
.arg("--delete-after-install")
|
||||||
.output()
|
.output()
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
|
|||||||
Reference in New Issue
Block a user