diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-03-18 02:17:46 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-03-18 02:17:46 +0900 |
| commit | b74a08dda968a161e066c92c1bf5b4489e5a4fbd (patch) | |
| tree | e3a30c69f078544184dcb72fc266a25384bfec12 /sandbox/path.go | |
| parent | 1b9408864f7f575b83b8f822e7551772ccd37009 (diff) | |
sandbox: prepare ops early
Some setup code needs to run in host root. This change allows that to happen.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'sandbox/path.go')
| -rw-r--r-- | sandbox/path.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/sandbox/path.go b/sandbox/path.go index 6c5a6e2c..4057748d 100644 --- a/sandbox/path.go +++ b/sandbox/path.go @@ -26,25 +26,6 @@ func toHost(name string) string { return path.Join(hostPath, name) } -func realpathHost(name string) (string, error) { - source := toHost(name) - rp, err := os.Readlink(source) - - if err != nil { - if errors.Is(err, syscall.EINVAL) { - // not a symlink - return name, nil - } - return "", err - } - - if !path.IsAbs(rp) { - return name, nil - } - msg.Verbosef("path %q resolves to %q", name, rp) - return rp, nil -} - func createFile(name string, perm os.FileMode, content []byte) error { if err := os.MkdirAll(path.Dir(name), 0755); err != nil { return err |
