Skip to content

Commit

Permalink
Merge pull request #197 from jedevc/translate-linkname-to-wire-format
Browse files Browse the repository at this point in the history
recv: translate linkname to wire format
  • Loading branch information
tonistiigi authored Apr 18, 2024
2 parents d38951d + 0c628a7 commit 497d33b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions send.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 497d33b

Please sign in to comment.