Open kreuzberger opened 2 years ago
Thanks for the bug report and the detailed analysis :+1:
A fix will need some time, as I'm currently quite busy. If you like and as you already proposed a solution, you can create a PR and add yourself to the AUTHORS file (ohh this is not there yet, but we should create it :) ) And if there are any questions about this, I'm will be happy to answer them.
I will provide a fix cause the suggested solution has issues with clean/incremental build cause "realpath" of the target behaves different if symbolic link exists or not. To provide a pull request: How do i run the tests in the package? I am not so familiar with python packages....
Thanks for supporting here :+1:
To be honest, this project does not have any tests or a CI configured. So this is the reason, why the win-specific problem got not detected. I should really do this one day :(
So the PR can contain the bug fix only. No tests yet...
In file collections/collections.py the target directory and conf directory are compared to evaluate if the link is created in the right directory. This fails on windows due to comparing configured python paths with os.path.realpath ones.
Assume you must also compare with the os.path.realpath of the target in Line 94:
if not target.startswith(os.path.realpath(app.confdir)): raise CollectionsException( 'Target path is not part of documentation folder\n'
if not os.path.realpath(target).startswith(os.path.realpath(app.confdir)): raise CollectionsException( 'Target path is not part of documentation folder\n'