Commit 0957be79 authored by Sebastian Stark's avatar Sebastian Stark

rename only if names are different

parent dd43c584
......@@ -139,9 +139,11 @@ func (s *snapshot) transIncomplete(cl clock) {
s.state = stateIncomplete
newName := s.FullName()
debugf("renaming incomplete snapshot %s -> %s", oldName, newName)
err := os.Rename(oldName, newName)
if err != nil {
log.Fatal(err)
if oldName != newName {
err := os.Rename(oldName, newName)
if err != nil {
log.Fatal(err)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment