Fix Rename call

Signed-off-by: Fabian Reinartz <freinartz@google.com>
This commit is contained in:
Fabian Reinartz 2018-08-03 11:25:27 -04:00
parent 76990518d3
commit 74b3501161

2
wal.go
View file

@ -1303,7 +1303,7 @@ func MigrateWAL(logger log.Logger, dir string) (err error) {
if err := repl.Close(); err != nil {
return errors.Wrap(err, "close new WAL")
}
if err := fileutil.Rename(tmpdir, dir); err != nil {
if err := fileutil.Replace(tmpdir, dir); err != nil {
return errors.Wrap(err, "replace old WAL")
}
return nil