From 0c628a73427a72c903a9c616f87a48b56ee715ad Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Thu, 18 Apr 2024 17:01:18 +0100 Subject: [PATCH] recv: translate linkname to wire format Signed-off-by: Justin Chadwell --- receive.go | 1 + send.go | 1 + 2 files changed, 2 insertions(+) diff --git a/receive.go b/receive.go index 2be245d7..6a82d205 100644 --- a/receive.go +++ b/receive.go @@ -224,6 +224,7 @@ func (r *receiver) run(ctx context.Context) error { return errors.WithStack(&os.PathError{Path: p.Stat.Path, Err: syscall.EINVAL, Op: "unrepresentable path"}) } p.Stat.Path = path + p.Stat.Linkname = filepath.FromSlash(p.Stat.Linkname) if fileCanRequestData(os.FileMode(p.Stat.Mode)) { r.mu.Lock() diff --git a/send.go b/send.go index ba97ef7a..43bf1717 100644 --- a/send.go +++ b/send.go @@ -161,6 +161,7 @@ func (s *sender) walk(ctx context.Context) error { return errors.WithStack(&os.PathError{Path: path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) } stat.Path = filepath.ToSlash(stat.Path) + stat.Linkname = filepath.ToSlash(stat.Linkname) p := &types.Packet{ Type: types.PACKET_STAT, Stat: stat,