Merge pull request #300 from Gouthamve/fix-prom-3956

Close file for windows platform
pull/5805/head
Fabian Reinartz 2018-03-14 07:17:19 -04:00 committed by GitHub
commit 7a62f6a0f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,9 @@ func repairBadIndexVersion(logger log.Logger, dir string) error {
if err := repl.Close(); err != nil {
return err
}
if err := broken.Close(); err != nil {
return err
}
if err := renameFile(repl.Name(), broken.Name()); err != nil {
return err
}