blob: e65f783a23d3b4c774da48a8906ce5f55020b387 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
package containerfs // import "github.com/docker/docker/pkg/containerfs"
import (
"path/filepath"
"github.com/moby/sys/symlink"
)
// ResolveScopedPath evaluates the given path scoped to the root.
// For example, if root=/a, and path=/b/c, then this function would return /a/b/c.
func ResolveScopedPath(root, path string) (string, error) {
return symlink.FollowSymlinkInScope(filepath.Join(root, path), root)
}
|