mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
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>
This commit is contained in:
parent
00404ae5ab
commit
9744de20cc
|
@ -61,6 +61,9 @@ func repairBadIndexVersion(logger log.Logger, dir string) error {
|
||||||
if err := repl.Close(); err != nil {
|
if err := repl.Close(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := broken.Close(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if err := renameFile(repl.Name(), broken.Name()); err != nil {
|
if err := renameFile(repl.Name(), broken.Name()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue