diff --git a/CHANGES.md b/CHANGES.md index 0f8acdf..f47dc63 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ This file describes changes in the smallgrp package. +# 1.5.4 (2024-MM-DD) + + - Don't attempt to load non-existent source files (this was + harmless so far as it failed silently, but in future GAP + versions may result in a scary warning or even an error) + # 1.5.3 (2023-05-16) - Fix `SmallGroupsAvailable(p^7)` to return `false` when p > 11 diff --git a/read.g b/read.g index 7dd7661..d6b9e1f 100644 --- a/read.g +++ b/read.g @@ -15,8 +15,17 @@ READ_SMALL_LIB := function() local i, s, LoadFunc; LoadFunc := path -> - {args...} -> - ReadPackage("smallgrp", Concatenation(path, "/", args[1])); + function(args...) + local relpath, filename; + relpath := Concatenation(path, "/", args[1]); + filename:= Filename( DirectoriesPackageLibrary( "smallgrp", "" ), relpath ); + if filename <> fail and IsReadableFile( filename ) then + Read( filename ); + return true; + else + return false; + fi; + end; s := 1; repeat s := s + 1;