Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save paths as valid json #4361

Merged
merged 1 commit into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/classes/json_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def replace_string_to_relative(self, match):
# If the file is on different drive. Don't abbreviate the path.
clean_path = orig_abs_path.replace("\\", "/")
clean_path = json.dumps(clean_path, ensure_ascii=False)
return f"{key}: {clean_path}"
return f"\"{key}\": {clean_path}"

# Remove file from abs path
orig_abs_folder = os.path.dirname(orig_abs_path)
Expand Down
2 changes: 1 addition & 1 deletion src/classes/project_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def read_legacy_project_file(self, file_path):
# Increment track counter
track_counter += 1

except Exception:
except Exception as ex:
# Error parsing legacy contents
msg = "Failed to load legacy project file %(path)s" % {"path": file_path}
log.error(msg, exc_info=1)
Expand Down