Sfoglia il codice sorgente

pkg/sysinfo.newV2() remove redundant path.Clean()

path.Join() already does path.Clean(), and the opts.cg2GroupPath
field is already cleaned as part of WithCgroup2GroupPath()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 4 anni fa
parent
commit
e70c5ea1a9
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      pkg/sysinfo/cgroup2_linux.go

+ 1 - 1
pkg/sysinfo/cgroup2_linux.go

@@ -47,7 +47,7 @@ func newV2(quiet bool, options ...Opt) *SysInfo {
 			applyPIDSCgroupInfoV2,
 			applyDevicesCgroupInfoV2,
 		}
-		dirPath := path.Join("/sys/fs/cgroup", path.Clean(g))
+		dirPath := path.Join("/sys/fs/cgroup", g)
 		for _, o := range opsV2 {
 			w := o(sysInfo, controllersM, dirPath)
 			warnings = append(warnings, w...)