From 3fb12e3c4472b10e4da1b0e5afd2265d720b053d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Mon, 15 Jul 2024 21:31:22 -0700 Subject: [PATCH] avoid null pointer if a broken symlink is trashed --- internal/files/trash.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/files/trash.go b/internal/files/trash.go index 77c349a..d2d0436 100644 --- a/internal/files/trash.go +++ b/internal/files/trash.go @@ -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()