skip file not found error when deleting

This commit is contained in:
Chris Lu 2021-05-15 09:37:39 -07:00
parent 45a762223a
commit 1aa7e99a89

View file

@ -158,10 +158,10 @@ func (v *Volume) cleanupCompact() error {
e1 := os.Remove(v.FileName(".cpd"))
e2 := os.Remove(v.FileName(".cpx"))
if e1 != nil {
if e1 != nil && !os.IsNotExist(e1) {
return e1
}
if e2 != nil {
if e2 != nil && !os.IsNotExist(e2) {
return e2
}
return nil