Close file for windows platform

Windows needs files that are being deleted to be closed.

Fixes: https://github.com/prometheus/prometheus/issues/3956Signed-off-by: NGoutham Veeramachaneni <cs14btech11014@iith.ac.in>
上级 00404ae5
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册