I have an absolute path to file A.
I have a relative path to file B from file A's directory. This path may and will use ".." to go up the directory structure in arbitrarily complex ways.
Example A:
C:projectsproject1module7submodule5fileA
Example Bs:
....module3submodule9subsubmodule32fileB
..submodule5fileB
....module7..module4submodule1fileB
fileB
How do I combine the two in order to get the simplest possible absolute path to file B?
question from:https://stackoverflow.com/questions/3204955/converting-relative-paths-to-absolute-paths