From 1fd26134feac4e4cff182282f2d9d2558c3fbe1e Mon Sep 17 00:00:00 2001 From: Bruno Michel Date: Thu, 21 Nov 2024 12:53:04 +0100 Subject: [PATCH] Avoid panic for invalid IDs --- web/files/files.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/files/files.go b/web/files/files.go index 79d9cd8c2f3..22fc4564059 100644 --- a/web/files/files.go +++ b/web/files/files.go @@ -1546,6 +1546,9 @@ func GetAllDocs(c echo.Context) error { out := make([]jsonapi.Object, 0) fp := vfs.NewFilePatherWithCache(inst.VFS()) for _, result := range results { + if result.DirDoc == nil { + continue + } if result.ID() == consts.TrashDirID { continue }