From a6d4d55b836331a574eca4d8a8252c40aba8564c Mon Sep 17 00:00:00 2001 From: adminer Date: Thu, 16 Jul 2026 08:30:05 +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 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/internal/endpoint/endpoint.go b/internal/endpoint/endpoint.go index d8cf736..de43c06 100644 --- a/internal/endpoint/endpoint.go +++ b/internal/endpoint/endpoint.go @@ -643,7 +643,22 @@ func (f subroot) MapToLocal(fs string) (*zfs.DatasetPath, error) { if p.Length() == 0 { return nil, errors.Errorf("cannot map empty filesystem") } + + // Патч: убираем pool name из source пути + if p.Length() > 1 { + subpath := p.Copy() + subpath.TrimNPrefixComps(1) // удаляем hdd_9XG1J9J1 + p = subpath + } + + // Дополнительно: если localRoot содержит client_identity (172.16.11.5), убираем его c := f.localRoot.Copy() + if c.Length() > 1 { + rootOnly := c.Copy() + rootOnly.TrimNPrefixComps(c.Length() - 1) // оставляем только chunk_9XG1J8T0 + c = rootOnly + } + c.Extend(p) return c, nil }