fix #29: fix stat() error checking

This commit is contained in:
2024-12-13 10:35:56 +01:00
parent 4dc87ac22e
commit 8098ccf000
2 changed files with 19 additions and 4 deletions

View File

@@ -113,8 +113,14 @@ func SetupLisp(conf *cfg.Config) error {
// iterate over load-path and evaluate all *.zy files there, if any
// we ignore if load-path does not exist, which is the default anyway
path, err := os.Stat(conf.LispLoadPath)
if os.IsNotExist(err) {
return nil
if err != nil {
if os.IsNotExist(err) {
// ignore non-existent files
return nil
}
return fmt.Errorf("failed to stat path: %w", err)
}
// init global hooks