From 8b5a942d392406ee3dea5b34ff9d767dc84c87d3 Mon Sep 17 00:00:00 2001 From: adminer Date: Fri, 17 Jul 2026 23:01:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20internal/endpoint/endpoint.go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/endpoint/endpoint.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/endpoint/endpoint.go b/internal/endpoint/endpoint.go index e740095..6f45119 100644 --- a/internal/endpoint/endpoint.go +++ b/internal/endpoint/endpoint.go @@ -631,7 +631,7 @@ func clientRoot(rootFS *zfs.DatasetPath, clientIdentity string) (*zfs.DatasetPat } func (s *Receiver) clientRootFromCtx(ctx context.Context) *zfs.DatasetPath { - // Патч: Игнорируем AppendClientIdentity и всегда возвращаем чистый root_fs + // Всегда чистый root без client identity return s.conf.RootWithoutClientComponent.Copy() } @@ -661,18 +661,18 @@ func (f subroot) MapToLocal(fs string) (*zfs.DatasetPath, error) { return nil, errors.Errorf("cannot map empty filesystem") } - // Убираем pool из source + // Убираем pool name из source (hdd_...) if p.Length() > 1 { subpath := p.Copy() subpath.TrimNPrefixComps(1) p = subpath } - // Берём ТОЛЬКО первый компонент от localRoot (chunk_9XG1J8T0) + // Всегда оставляем только root (chunk_9XG1J8T0) c := f.localRoot.Copy() - if c.Length() > 0 { + if c.Length() > 1 { rootOnly := c.Copy() - rootOnly.TrimNPrefixComps(c.Length() - 1) // оставляем только chunk_... + rootOnly.TrimNPrefixComps(c.Length() - 1) c = rootOnly }