mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
removing a non-existent item from disk cache is not an error
This commit is contained in:
parent
5d1ce327e0
commit
328745cad9
1 changed files with 4 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue