Converts to/from files to relative paths before passing them into path_to_file, which expects two paths relative to the same root.
I don't believe this should cause issues with existing CBMC-viewer usage:
If both paths are already relative (even if not relative to current directory) , then os.path.relpath won't change either of them, so there is no issue.
If both paths are absolute, then they still have the same relative difference, and so path_to_file should return the same value.
If one of the paths is absolute and the other is relative to the current directory, then os.path.relpath will not change the relative difference between the two paths.
If one of the paths is absolute and the other is relative to a directory other than the current directory, then this change will lead to invalid links, however this scenario would already lead to invalid links prior to this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
Fixes issue #45
Description of changes:
Converts to/from files to relative paths before passing them into
path_to_file
, which expects two paths relative to the same root.I don't believe this should cause issues with existing CBMC-viewer usage:
os.path.relpath
won't change either of them, so there is no issue.path_to_file
should return the same value.os.path.relpath
will not change the relative difference between the two paths.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.