
moby/moby SHA : 9c15e82f19b0ad3c5fe8617a8ec2dddc6639f40a github.com/docker/docker/pkg/truncindex/truncindex.go -> pkg/cri/store/truncindex/truncindex.go github.com/docker/docker/pkg/symlink/LICENSE.APACHE -> pkg/symlink/LICENSE.APACHE github.com/docker/docker/pkg/symlink/LICENSE.BSD -> pkg/symlink/LICENSE.BSD github.com/docker/docker/pkg/symlink/README.md -> pkg/symlink/README.md github.com/docker/docker/pkg/symlink/fs.go -> pkg/symlink/fs.go github.com/docker/docker/pkg/symlink/fs_unix.go -> pkg/symlink/fs_unix.go github.com/docker/docker/pkg/symlink/fs_windows.go -> pkg/symlink/fs_windows.go Signed-off-by: Davanum Srinivas <davanum@gmail.com>
36 lines
916 B
Go
36 lines
916 B
Go
// +build !windows
|
|
|
|
/*
|
|
Copyright The containerd Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// This file is a copy of moby/moby/pkg/symlink/fs_unix.go
|
|
|
|
package symlink
|
|
|
|
import (
|
|
"path/filepath"
|
|
)
|
|
|
|
func evalSymlinks(path string) (string, error) {
|
|
return filepath.EvalSymlinks(path)
|
|
}
|
|
|
|
func isDriveOrRoot(p string) bool {
|
|
return p == string(filepath.Separator)
|
|
}
|
|
|
|
var isAbs = filepath.IsAbs
|