Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/methwhy.g
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,13 @@ BIND_GLOBAL("PageSource", function ( fun, nr... )
l := fail;
f := FILENAME_FUNC( fun );
if IsString(f) and Length(f)>0 and f[1] <> '/' then
if Length(f) > 7 and f{[1..8]} = "GAPROOT/" then
f := f{[9..Length(f)]};
# first assume it is a local path, otherwise look in GAP roots
if not IsReadableFile(f) then
if Length(f) > 7 and f{[1..8]} = "GAPROOT/" then
f := f{[9..Length(f)]};
fi;
f := Filename(List(GAPInfo.RootPaths, Directory), f);
fi;
f := Filename(List(GAPInfo.RootPaths, Directory), f);
fi;
if f = fail and fun in OPERATIONS then
# for operations we show the location(s) of their declaration
Expand Down