Closed econwang closed 3 months ago
Thanks for reporting this @econwang, sorry it's taken so long to take a look! Do you have an example that errors? The examples include e.g. use iso_fortran_env
and the links work ok.
Yes, it works with PosixPath
, so no problem on linux, but on windows, it will raise WinError 123
error.
In [1]: import pathlib
In [2]: url = 'https://github.com/Fortran-FOSS-Programmers/ford/issues/648'
In [3]: pathlib.Path(url).resolve()
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[3], line 1
----> 1 pathlib.Path(url).resolve()
File C:\Intel\intelpython\lib\pathlib.py:1215, in Path.resolve(self, strict)
1209 def resolve(self, strict=False):
1210 """
1211 Make the path absolute, resolving all symlinks on the way and also
1212 normalizing it (for example turning slashes into backslashes under
1213 Windows).
1214 """
-> 1215 s = self._flavour.resolve(self, strict=strict)
1216 if s is None:
1217 # No symlink resolution => for consistency, raise an error if
1218 # the path doesn't exist or is forbidden
1219 self.stat()
Ah, yes I can see how that would be a problem! I think the obvious fix is just skip this for links already beginning with http
The
relative_url
function in output.py:will raise error for urls, such as
INTRINSIC_MODS
in settings.py.