summaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/json2c.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk/cli/json2c.py')
-rwxr-xr-xlib/python/qmk/cli/json2c.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/json2c.py b/lib/python/qmk/cli/json2c.py
index e7babc0e4c..5a2fb96c78 100755
--- a/lib/python/qmk/cli/json2c.py
+++ b/lib/python/qmk/cli/json2c.py
@@ -37,7 +37,7 @@ def json2c(cli):
if cli.args.output:
cli.args.output.parent.mkdir(parents=True, exist_ok=True)
if cli.args.output.exists():
- cli.args.output.replace(cli.args.output.name + '.bak')
+ cli.args.output.replace(cli.args.output.parent / (cli.args.output.name + '.bak'))
cli.args.output.write_text(keymap_c)
if not cli.args.quiet: