diff options
| author | 2023-04-28 01:36:55 +0800 | |
|---|---|---|
| committer | 2023-04-28 01:36:55 +0800 | |
| commit | fc8c5fdce62fb229202659408798a7b6c98f6e8b (patch) | |
| tree | 7554f80e50de4af6fd255afa7c21bcdd58a7af34 /cli/internal/turbopath/absolute_system_path_darwin.go | |
| parent | dd84b9d64fb98746a230cd24233ff50a562c39c9 (diff) | |
| download | HydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.tar.gz HydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.zip | |
Diffstat (limited to 'cli/internal/turbopath/absolute_system_path_darwin.go')
| -rw-r--r-- | cli/internal/turbopath/absolute_system_path_darwin.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/cli/internal/turbopath/absolute_system_path_darwin.go b/cli/internal/turbopath/absolute_system_path_darwin.go deleted file mode 100644 index e2c3bff..0000000 --- a/cli/internal/turbopath/absolute_system_path_darwin.go +++ /dev/null @@ -1,23 +0,0 @@ -//go:build darwin -// +build darwin - -// Adapted from https://github.com/containerd/continuity/blob/b4ca35286886296377de39e6eafd1affae019fc3/driver/lchmod_unix.go -// Copyright The containerd Authors -// SPDX-License-Identifier: Apache-2.0 - -package turbopath - -import ( - "os" - - "golang.org/x/sys/unix" -) - -// Lchmod changes the mode of a file not following symlinks. -func (p AbsoluteSystemPath) Lchmod(mode os.FileMode) error { - err := unix.Fchmodat(unix.AT_FDCWD, p.ToString(), uint32(mode), unix.AT_SYMLINK_NOFOLLOW) - if err != nil { - err = &os.PathError{Op: "lchmod", Path: p.ToString(), Err: err} - } - return err -} |
