Skip to content

Commit fc9af3b

Browse files
authored
Merge pull request #4361 from OpenShot/fix-path-bug
save paths as valid json
2 parents 4bd27e0 + 1c5dfe8 commit fc9af3b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/classes/json_data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def replace_string_to_relative(self, match):
314314
# If the file is on different drive. Don't abbreviate the path.
315315
clean_path = orig_abs_path.replace("\\", "/")
316316
clean_path = json.dumps(clean_path, ensure_ascii=False)
317-
return f"{key}: {clean_path}"
317+
return f"\"{key}\": {clean_path}"
318318

319319
# Remove file from abs path
320320
orig_abs_folder = os.path.dirname(orig_abs_path)

src/classes/project_data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ def read_legacy_project_file(self, file_path):
647647
# Increment track counter
648648
track_counter += 1
649649

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

0 commit comments

Comments
 (0)