From 95a2099c906feaa808345a01390afe3c83a41ae0 Mon Sep 17 00:00:00 2001 From: "Mike A." Date: Sun, 29 Sep 2024 17:15:59 +0200 Subject: [PATCH] Allow whitespace in `tee` command paths --- passes/cmds/tee.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/passes/cmds/tee.cc b/passes/cmds/tee.cc index 39ed4a7a85f..853f1bad36f 100644 --- a/passes/cmds/tee.cc +++ b/passes/cmds/tee.cc @@ -72,7 +72,9 @@ struct TeePass : public Pass { } if ((args[argidx] == "-o" || args[argidx] == "-a") && argidx+1 < args.size()) { const char *open_mode = args[argidx] == "-o" ? "w" : "a+"; - FILE *f = fopen(args[++argidx].c_str(), open_mode); + auto path = args[++argidx]; + rewrite_filename(path); + FILE *f = fopen(path.c_str(), open_mode); yosys_input_files.insert(args[argidx]); if (f == NULL) { for (auto cf : files_to_close)