Whoops, don't ignore error from filepath.Abs.

This commit is contained in:
Solderpunk 2023-02-15 21:15:14 +01:00
parent 8372142843
commit c0c67f7ba6
1 changed files with 4 additions and 1 deletions

View File

@ -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