MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / resolveRuntimePath

Function resolveRuntimePath

agent/app/service/runtime_utils.go:94–103  ·  view source on GitHub ↗
(dir string)

Source from the content-addressed store, hash-verified

92}
93
94func resolveRuntimePath(dir string) string {
95 cleanDir := filepath.Clean(dir)
96 if realDir, err := filepath.EvalSymlinks(cleanDir); err == nil {
97 return realDir
98 }
99 if absDir, err := filepath.Abs(cleanDir); err == nil {
100 return absDir
101 }
102 return cleanDir
103}
104
105func handlePHP(create request.RuntimeCreate, runtime *model.Runtime, fileOp files.FileOp, appVersionDir string) (err error) {
106 runtimeDir := path.Join(global.Dir.RuntimeDir, create.Type)

Callers 1

isPathInsideOrEqualFunction · 0.85

Calls 1

CleanMethod · 0.65

Tested by

no test coverage detected