We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72cbb2f commit 75b6cfbCopy full SHA for 75b6cfb
process_metrics_linux.go
@@ -413,5 +413,8 @@ func getCgroupV2Path() string {
413
if len(tmp) != 2 {
414
return ""
415
}
416
- return "/sys/fs/cgroup" + strings.TrimSpace(tmp[1])
+ path := "/sys/fs/cgroup" + strings.TrimSpace(tmp[1])
417
+
418
+ // Drop trailing slash if it exsits. This prevents from '//' in the constructed paths by the caller.
419
+ return strings.TrimSuffix(path, "/")
420
0 commit comments