From 55c8677443779c0221ec7ae6144d6374dd5d9224 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Tue, 12 Mar 2024 18:31:01 +0100 Subject: [PATCH] restored the log if retrieving directory entries fails Signed-off-by: Nicola Murino --- internal/common/connection.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/common/connection.go b/internal/common/connection.go index bfa6ad0e..09c59e0e 100644 --- a/internal/common/connection.go +++ b/internal/common/connection.go @@ -314,6 +314,8 @@ func (c *BaseConnection) ListDir(virtualPath string) (*DirListerAt, error) { virtualPath: virtualPath, user: &c.User, info: c.User.GetVirtualFoldersInfo(virtualPath), + id: c.ID, + protocol: c.protocol, lister: lister, }, nil } @@ -1801,6 +1803,8 @@ type DirListerAt struct { virtualPath string user *dataprovider.User info []os.FileInfo + id string + protocol string mu sync.Mutex lister vfs.DirLister } @@ -1843,6 +1847,7 @@ func (l *DirListerAt) Next(limit int) ([]os.FileInfo, error) { for { files, err := l.lister.Next(limit) if err != nil && !errors.Is(err, io.EOF) { + logger.Debug(l.protocol, l.id, "error retrieving directory entries: %+v", err) return files, err } files = l.user.FilterListDir(files, l.virtualPath)