Skip to content

Commit 9716cfc

Browse files
authored
Do not remove src files for sub-packages
Fixes the condition where sub-packages do not have the src files generated, and links to them fail with a 404. A current example of this is in the [ponylang/ssl](https://ponylang.github.io/ssl) documentation, where attempting to view any of the source code in [ssl/net](https://ponylang.github.io/ssl/ssl-net--index/) or [ssl/crypto](https://ponylang.github.io/ssl/ssl-crypto--index/) will result in a 404. The "removing other sources" section of entrypoint.py removed any sources that did not match the library name. This changes the behaviour to removing sources that do not match library name *or* library_name + '-'. This is consistent with the "removing other docs" section of entrypoint.py.
1 parent 2776003 commit 9716cfc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

entrypoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
print(INFO + "Removing 'other sources'." + ENDC)
6363
for f in os.listdir(source_dir):
64-
if f != library_name:
64+
if not (f.startswith(library_name + '-') or (f == library_name)):
6565
p = os.path.join(source_dir, f)
6666
if os.path.isfile(p):
6767
os.remove(p)

0 commit comments

Comments
 (0)