1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-26 01:37:12 +00:00

server: Check repository version

This commit is contained in:
Alexander Neumann 2015-05-04 20:40:02 +02:00
parent 5399358272
commit ae1a85c896

View file

@ -559,6 +559,10 @@ func (s *Server) loadConfig(cfg *Config) error {
return err return err
} }
if cfg.Version != RepositoryVersion {
return errors.New("unsupported repository version")
}
if !cfg.ChunkerPolynomial.Irreducible() { if !cfg.ChunkerPolynomial.Irreducible() {
return errors.New("invalid chunker polynomial") return errors.New("invalid chunker polynomial")
} }