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

file_bundle_utils assumes paths are relative to the running process CWD #1783

Open
ssteinbach opened this issue Jul 16, 2024 · 2 comments
Open
Labels
good first issue If you're looking for a way to contribute, but not sure where to start. This is a good first issue. needs discussion
Milestone

Comments

@ssteinbach
Copy link
Collaborator

The file bundle adapters convert relative paths in the OTIO files here:

target_file = os.path.abspath(url_utils.filepath_from_url(target_url))

This uses the process CWD as the root directory. It might make more sense to make paths relative to the .otio file location. Alternatively, we could disallow relative paths in file bundles entirely.

@jminor
Copy link
Collaborator

jminor commented Jul 16, 2024

I agree that using the CWD is not a good idea.

If we allow the paths to be relative to the .otio file, then converting between OTIOZ and OTIOD will allow the content.otio to be identical. If we disallow relative paths, then that conversion will require re-writing the paths.

@ssteinbach
Copy link
Collaborator Author

I think the right way to fix this, given that this is the only thing in OTIO that cares about this, is to add an argument to the adapter that allows you to specify the relative path policy:

  • disallow
  • relative to CWD of process
  • relative to root otio file

If we wanted to preserve the current behavior we could leave the default at "relative to CWD of process" otherwise we could set it to relative to root otio file.

@reinecke reinecke added the good first issue If you're looking for a way to contribute, but not sure where to start. This is a good first issue. label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue If you're looking for a way to contribute, but not sure where to start. This is a good first issue. needs discussion
Projects
None yet
Development

No branches or pull requests

3 participants