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

Rewrite conversion of relative and absolute path support in OpenShot #2477

Merged
merged 3 commits into from
Dec 27, 2018

Conversation

jonoomph
Copy link
Member

I have done a complete rewrite of relative and absolute path support in OpenShot, to work as the JSON is read and write. It uses regex to quickly find all mentions of "path": or "image": , and converts the paths as needed: absolute when loading a project, and relative when saving. Even better, it also catches all paths in the undo/redo history, and fully supports @transitions relative paths.

I've done quite a bit of testing on Linux, and this seems to work much better than the previous approach. I need to now test on Windows and Mac, to verify this has no OS dependencies.

…is is to address absolute paths burried inside the undo/redo history.
…x when the JSON is read and written to the file. This prevents lots of iterating over dicts, and is more full-proof for finding paths, even ones listed in the undo/redo history.
@jonoomph
Copy link
Member Author

@ferdnyc This will handle undo/redo paths which point to /tmp/ mounting paths, so long as the user re-saves the project using this new code. But moving forward, all paths will always be saved relative, including those in the undo/redo history (thus supporting /tmp/ mount points and such). 👍

…ven happen anymore... but some older project files can still contain these keys, which can be giant blobs of data.
@jonoomph
Copy link
Member Author

I also found another case of "bloated" undo/redo history... where we had an updateAction for "history" itself... which contained an entire clone of the history data structure. That was discovered by @peanutbutterandcrackers and also fixed in this branch. 😄

@jonoomph jonoomph merged commit d7fe16c into develop Dec 27, 2018
@jonoomph jonoomph deleted the transition-path-history branch December 27, 2018 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant