scopesim.commands.user_commands.patch_fake_symlinks#
- scopesim.commands.user_commands.patch_fake_symlinks(path: Path)#
Fix broken symlinks in path.
The irdb has some symlinks in it, which work fine under linux, but not always under windows, see https://stackoverflow.com/a/11664406 .
“This makes symlinks created and committed e.g. under Linux appear as plain text files that contain the link text under Windows”
It is therefore necessary to assume that these can be regular files.
E.g. when Path.cwd() is WindowsPath(‘C:/Users/hugo/hugo/repos/irdb/MICADO/docs/example_notebooks’) and path is WindowsPath(‘inst_pkgs/MICADO’) then this function should return WindowsPath(‘C:/Users/hugo/hugo/repos/irdb/MICADO’)