[F] Maybe fix path escaping issue #496
This commit is contained in:
@@ -411,8 +411,14 @@ where
|
|||||||
{
|
{
|
||||||
let bash_path = bash_path().context("failed to get bash path")?;
|
let bash_path = bash_path().context("failed to get bash path")?;
|
||||||
let mut command = Command::new(bash_path);
|
let mut command = Command::new(bash_path);
|
||||||
command.arg(neofetch_path);
|
|
||||||
command.args(args);
|
// Convert path to use forward slashes because bash will interpret backslashes as escapes
|
||||||
|
command.arg(neofetch_path.to_string_lossy().replace('\\', "/"));
|
||||||
|
|
||||||
|
for arg in args {
|
||||||
|
// Also convert any backslashes in arguments to forward slashes for bash
|
||||||
|
command.arg(arg.as_ref().to_string_lossy().replace('\\', "/"));
|
||||||
|
}
|
||||||
Ok(command)
|
Ok(command)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user