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,