avoid null pointer if a broken symlink is trashed

This commit is contained in:
Lilian Jónsdóttir 2024-07-15 21:31:22 -07:00
parent 35342a06ac
commit 3fb12e3c44

View file

@ -85,6 +85,7 @@ func FindTrash(trashdir, ogdir string, f *filter.Filter) (files Files, outerr er
info, err := os.Stat(trashedpath)
if err != nil {
log.Errorf("error reading %s: %s", trashedpath, err)
return nil
}
s := s.Key(trash_info_date).Value()