Skip to content

Commit ff9537e

Browse files
committed
Make all package dirs absolute
1 parent 88d71b3 commit ff9537e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/package.gi

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ InstallGlobalFunction( InitializePackagesInfoRecords, function( arg )
304304
# the first time this is called, add the cmd line args to the list
305305
if IsEmpty(GAPInfo.PackageDirectories) then
306306
for pkgdirstrs in GAPInfo.CommandLineOptions.packagedirs do
307-
pkgdirs:= List( SplitString( pkgdirstrs, ";" ), Directory );
307+
pkgdirs:= List( List( SplitString( pkgdirstrs, ";" ), GAP_realpath ), Directory );
308308
for pkgdir in pkgdirs do
309309
if not pkgdir in GAPInfo.PackageDirectories then
310310
Add( GAPInfo.PackageDirectories, pkgdir );
@@ -1897,8 +1897,10 @@ InstallGlobalFunction( ExtendPackageDirectories, function( paths_or_dirs )
18971897
changed:= false;
18981898
for p in paths_or_dirs do
18991899
if IsString( p ) then
1900-
p:= Directory( p );
1901-
elif not IsDirectory( p ) then
1900+
p:= Directory( GAP_realpath ( p ) );
1901+
elif IsDirectory( p ) then
1902+
p:= Directory( GAP_realpath ( p![1] ) );
1903+
else
19021904
Error("input must be a list of path strings or directory objects");
19031905
fi;
19041906
if not p in GAPInfo.PackageDirectories then

0 commit comments

Comments
 (0)