From 4b677780da012bf0fb21b8986d2802d015b76057 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Wed, 17 Jan 2024 20:24:21 +0100 Subject: [PATCH] Fix tree syncer --- nodespace/service.go | 2 +- nodespace/treesyncer/treesyncer.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nodespace/service.go b/nodespace/service.go index cddd613..c1e2c57 100644 --- a/nodespace/service.go +++ b/nodespace/service.go @@ -124,7 +124,7 @@ func (s *service) loadSpace(ctx context.Context, id string) (value ocache.Object if err = s.checkDeletionStatus(id); err != nil { return nil, err } - cc, err := s.commonSpace.NewSpace(ctx, id, commonspace.Deps{TreeSyncer: treesyncer.New()}) + cc, err := s.commonSpace.NewSpace(ctx, id, commonspace.Deps{TreeSyncer: treesyncer.New(id)}) if err != nil { return } diff --git a/nodespace/treesyncer/treesyncer.go b/nodespace/treesyncer/treesyncer.go index e206fef..f73fe1d 100644 --- a/nodespace/treesyncer/treesyncer.go +++ b/nodespace/treesyncer/treesyncer.go @@ -14,8 +14,8 @@ import ( var log = logger.NewNamed(treesyncer.CName) -func New() treesyncer.TreeSyncer { - return &treeSyncer{} +func New(spaceId string) treesyncer.TreeSyncer { + return &treeSyncer{spaceId: spaceId} } type treeSyncer struct {