From 1e19dbd0f7963d0418ddaa6a5fbf4807ca5ec680 Mon Sep 17 00:00:00 2001 From: "x.zhou" Date: Wed, 24 Sep 2025 15:08:33 +0800 Subject: [PATCH] fix: treat "." as dir in List() of encrypted storage --- pkg/storage/encrypted/encrypted.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/encrypted/encrypted.go b/pkg/storage/encrypted/encrypted.go index aa935dd..d449abb 100644 --- a/pkg/storage/encrypted/encrypted.go +++ b/pkg/storage/encrypted/encrypted.go @@ -138,7 +138,7 @@ func (s *encryptedStorage) List(ctx context.Context, rpath string, opt *storage. if opt.PathIsFile { // list a file return s.underlying.List(ctx, rpath+encryptedFileSuffix, opt, myCb) - } else if strings.HasSuffix(rpath, "/") { + } else if strings.HasSuffix(rpath, "/") || rpath == "." { // rpath is a folder return s.underlying.List(ctx, rpath, opt, myCb) } else {