From ecf7b8f1b01ac0c9b22716146d259052762405eb Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 22 Mar 2021 16:48:33 +0100 Subject: [PATCH] Windows specific fixes --- sbysrc/sby_core.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index bf1b66e..eac1bfd 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -64,11 +64,14 @@ class SbyTask: "{" : "(", "}" : ")", } - - cmdline_copy = cmdline - for u, w in replacements.items(): - cmdline_copy = cmdline_copy.replace(u, w) - self.cmdline = cmdline_copy + parts = cmdline.split("'") + for i in range(len(parts)): + if i % 2 == 0: + cmdline_copy = parts[i] + for u, w in replacements.items(): + cmdline_copy = cmdline_copy.replace(u, w) + parts[i] = cmdline_copy + self.cmdline = '"'.join(parts) self.logfile = logfile self.noprintregex = None self.notify = [] -- 2.30.2