mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
removing a non-existent item from disk cache is not an error
This commit is contained in:
@@ -292,7 +292,10 @@ func (dc *DiskCache) add(key string, items map[string][]byte) (err error) {
|
||||
}
|
||||
if len(data) == 0 {
|
||||
if err = os.Remove(p); err != nil {
|
||||
return
|
||||
if !os.IsNotExist(err) {
|
||||
return
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
changed -= before
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user