idun/vendor/github.com/pkg/sftp/server_unix.go

17 lines
225 B
Go
Raw Normal View History

2023-10-12 08:20:53 +00:00
//go:build !windows && !plan9
// +build !windows,!plan9
package sftp
import (
"path"
)
func (s *Server) toLocalPath(p string) string {
if s.workDir != "" && !path.IsAbs(p) {
p = path.Join(s.workDir, p)
}
return p
}