Browse Source

Close file for windows platform

Windows needs files that are being deleted to be closed.

Fixes: https://github.com/prometheus/prometheus/issues/3956

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
pull/5805/head
Goutham Veeramachaneni 7 years ago
parent
commit
9744de20cc
No known key found for this signature in database
GPG Key ID: F1C217E8E9023CAD
  1. 3
      repair.go

3
repair.go

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

Loading…
Cancel
Save