mirror of
https://github.com/openziti/zrok.git
synced 2024-11-07 16:54:23 +01:00
more tolerance in zrokdir metadata checking (#134)
This commit is contained in:
parent
ee7c0fcca6
commit
2ec8a07d4b
@ -3,6 +3,7 @@ package zrokdir
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"os"
|
||||
)
|
||||
|
||||
@ -19,7 +20,8 @@ func checkMetadata() error {
|
||||
}
|
||||
data, err := os.ReadFile(mf)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error reading metadata file '%v'", mf)
|
||||
logrus.Warnf("unable to read zrokdir metadata; ignoring non-existent: %v", err)
|
||||
return nil
|
||||
}
|
||||
m := &Metadata{}
|
||||
if err := json.Unmarshal(data, m); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user