Skip to content

Commit 1fd2613

Browse files
committed
Avoid panic for invalid IDs
1 parent 29d1c86 commit 1fd2613

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web/files/files.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,6 +1546,9 @@ func GetAllDocs(c echo.Context) error {
15461546
out := make([]jsonapi.Object, 0)
15471547
fp := vfs.NewFilePatherWithCache(inst.VFS())
15481548
for _, result := range results {
1549+
if result.DirDoc == nil {
1550+
continue
1551+
}
15491552
if result.ID() == consts.TrashDirID {
15501553
continue
15511554
}

0 commit comments

Comments
 (0)