fix: incorrect json wallpaper path

Fix json path export on windows thats generate before
This commit is contained in:
npdev453 2020-11-24 12:54:13 +03:00 committed by GitHub
parent 4997a49eb7
commit 1d180a7e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,12 @@ def template(colors, input_file, output_file=None):
def flatten_colors(colors):
"""Prepare colors to be exported.
Flatten dicts and convert colors to util.Color()"""
all_colors = {"wallpaper": colors["wallpaper"],
wallpaper_path = colors["wallpaper"]
if os == "Windows" :
wallpaper_path = wallpaper_path.replace("\\","\\\\")
all_colors = {"wallpaper": wallpaper_path,
"alpha": colors["alpha"],
**colors["special"],
**colors["colors"]}