mirror of
https://github.com/StevenBlack/hosts.git
synced 2025-03-14 10:36:53 +00:00
Fix location issue under windows.
This patch fix https://github.com/StevenBlack/hosts/issues/1166#issuecomment-634686875
This commit is contained in:
@ -1210,6 +1210,11 @@ def update_readme_data(readme_file, **readme_updates):
|
||||
readme_data = json.load(f)
|
||||
readme_data[extensions_key] = generation_data
|
||||
|
||||
for denomination, data in readme_data.copy().items():
|
||||
if "location" in data and data["location"] and "\\" in data["location"]:
|
||||
# Windows compatibility: #1166
|
||||
readme_data[denomination]["location"] = data["location"].replace("\\", "/")
|
||||
|
||||
with open(readme_file, "w") as f:
|
||||
json.dump(readme_data, f)
|
||||
|
||||
|
Reference in New Issue
Block a user