github.com/pkg/sftp@v1.13.6/server_unix.go (about)

     1  //go:build !windows && !plan9
     2  // +build !windows,!plan9
     3  
     4  package sftp
     5  
     6  import (
     7  	"path"
     8  )
     9  
    10  func (s *Server) toLocalPath(p string) string {
    11  	if s.workDir != "" && !path.IsAbs(p) {
    12  		p = path.Join(s.workDir, p)
    13  	}
    14  
    15  	return p
    16  }