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 }