From 5b9865382e006adbb3e9800c251cf15d1b7d7a36 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Sun, 12 Apr 2026 18:36:27 +0000 Subject: [PATCH] [F] Maybe fix path escaping issue #496 --- crates/hyfetch/src/neofetch_util.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/hyfetch/src/neofetch_util.rs b/crates/hyfetch/src/neofetch_util.rs index 466040b4..c715aaf7 100644 --- a/crates/hyfetch/src/neofetch_util.rs +++ b/crates/hyfetch/src/neofetch_util.rs @@ -411,8 +411,14 @@ where { let bash_path = bash_path().context("failed to get 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) } }