engine: graph: Don't error when state file is missing
For some reason we get errors when we try to remove a non-existent state file. There's a slight possibility that it could be a bug we're working around, but it's not clear that this is the case, and I think it's possible that a state file could have gotten nuked by the user somehow, although this was occurring "naturally" when running reverse1.mcl so let's keep that working for now.
This commit is contained in:
@@ -291,5 +291,10 @@ func (obj *State) ReversalDelete() error {
|
|||||||
}
|
}
|
||||||
file := path.Join(dir, ReverseFile) // return a unique file
|
file := path.Join(dir, ReverseFile) // return a unique file
|
||||||
|
|
||||||
return errwrap.Wrapf(os.Remove(file), "could not remove reverse state file")
|
// FIXME: why do we see these removals when there isn't a state file?
|
||||||
|
if err = os.Remove(file); os.IsNotExist(err) {
|
||||||
|
return nil // ignore missing files
|
||||||
|
}
|
||||||
|
|
||||||
|
return errwrap.Wrapf(err, "could not remove reverse state file")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user