mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
fix: delete cached previews when deleting file
This commit is contained in:
parent
c9340af8d0
commit
f5d02cdde9
5 changed files with 156 additions and 25 deletions
|
|
@ -68,7 +68,7 @@ func (f *FileCache) Delete(ctx context.Context, key string) error {
|
|||
defer mu.Unlock()
|
||||
|
||||
fileName := f.getFileName(key)
|
||||
if err := f.fs.Remove(fileName); err != nil && err != os.ErrNotExist {
|
||||
if err := f.fs.Remove(fileName); err != nil && !errors.Is(err, os.ErrNotExist) {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue