mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
18 lines
268 B
Go
18 lines
268 B
Go
|
// +build windows
|
||
|
|
||
|
package utils
|
||
|
|
||
|
import (
|
||
|
"path/filepath"
|
||
|
|
||
|
"github.com/docker/docker/pkg/longpath"
|
||
|
)
|
||
|
|
||
|
func getContextRoot(srcPath string) (string, error) {
|
||
|
cr, err := filepath.Abs(srcPath)
|
||
|
if err != nil {
|
||
|
return "", err
|
||
|
}
|
||
|
return longpath.AddPrefix(cr), nil
|
||
|
}
|