Skip to content

Commit

Permalink
Corrected a problem that was reseting assets settings to "factory def…
Browse files Browse the repository at this point in the history
…aults"
  • Loading branch information
Gemmstone committed Apr 7, 2024
1 parent c49d6eb commit 961bc25
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def is_path(string):

def update_nested_dict(dest_data, source_data):
for key, value in source_data.items():
pass
if isinstance(value, dict):
if is_path(os.path.normpath(key)):
if os.path.normpath(key) not in dest_data:
Expand Down Expand Up @@ -106,10 +107,11 @@ def update_json_file(source_path, dest_path):
with open(dest_path, 'w', encoding='utf-8') as dest_file:
json.dump(source_data, dest_file, indent=4, ensure_ascii=False)
else:
dest_data = update_nested_dict(dest_data, source_data)
pass
# dest_data = update_nested_dict(dest_data, source_data)

with open(dest_path, 'w') as dest_file:
json.dump(dest_data, dest_file, indent=4, ensure_ascii=False)
# with open(dest_path, 'w') as dest_file:
# json.dump(dest_data, dest_file, indent=4, ensure_ascii=False)
else:
shutil.copyfile(source_path, dest_path)

Expand Down

0 comments on commit 961bc25

Please sign in to comment.