Skip to content

Commit

Permalink
Fix ChangeDirectoryCurrent when used with relative paths
Browse files Browse the repository at this point in the history
It used to set GAPInfo.DirectoryCurrent to an invalid value
  • Loading branch information
fingolfin committed Sep 19, 2018
1 parent 32da069 commit b2e333c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
This file describes changes in the IO package.

X.Y
- Add IO_getcwd
- Add IO_getcwd to query the current working directory
- Fix ChangeDirectoryCurrent when used with relative paths
(it used to set GAPInfo.DirectoryCurrent to an invalid value)

4.5.3 (2018-09-18)
- Minimal GAP version is 4.9 (it already effectively was in 4.5.2, but PackageInfo.g
Expand Down
2 changes: 1 addition & 1 deletion gap/io.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,7 @@ if IsBoundGlobal("_IO_Defines_ChangeDirectoryCurrent") then
InstallGlobalFunction( ChangeDirectoryCurrent,
function( path )
if IO_chdir(path) = true then
GAPInfo.DirectoryCurrent := Directory(path);
GAPInfo.DirectoryCurrent := Directory(IO_getcwd());
return true;
else
return fail;
Expand Down

0 comments on commit b2e333c

Please sign in to comment.