From c0c67f7ba663fac03ac3c44f7d7d6ecfbd221165 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Wed, 15 Feb 2023 21:15:14 +0100 Subject: [PATCH] Whoops, don't ignore error from filepath.Abs. --- config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config.go b/config.go index 40ed862..e1bfc79 100644 --- a/config.go +++ b/config.go @@ -96,7 +96,10 @@ func getConfig(filename string) (Config, error) { // Validate chroot() dir if config.ChrootDir != "" { - config.ChrootDir = filepath.Abs(config.ChrootDir) + config.ChrootDir, err = filepath.Abs(config.ChrootDir) + if err != nil { + return config, err + } _, err := os.Stat(config.ChrootDir) if os.IsNotExist(err) { return config, err