return os.ErrNotExist instead of written error

This commit is contained in:
Haris Khan
2024-10-26 13:50:59 -04:00
parent 0af72cba75
commit 25eedfeed8

View File

@ -88,7 +88,7 @@ func LoadKeys(r string) (I2PKeys, error) {
}
if !exists {
log.WithError(err).Error("File does not exist")
return I2PKeys{}, fmt.Errorf("file does not exist: %s", r)
return I2PKeys{}, os.ErrNotExist
}
fi, err := os.Open(r)
if err != nil {