Skip to content

Commit f469004

Browse files
committed
Fix incorrect use of Path.getRoot()
1 parent 74633af commit f469004

File tree

1 file changed

+1
-1
lines changed
  • dd-java-agent/agent-profiling/profiling-controller/src/main/java/com/datadog/profiling/controller

1 file changed

+1
-1
lines changed

dd-java-agent/agent-profiling/profiling-controller/src/main/java/com/datadog/profiling/controller/TempLocationManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ private void createTempDir(Path tempDir) {
465465
// we will find the first offender not having the expected permissions and fail the check
466466
if (isPosixFs) {
467467
// take the first subfolder below the base temp dir
468-
Path root = baseTempDir.resolve(baseTempDir.relativize(tempDir).getRoot());
468+
Path root = baseTempDir.resolve(baseTempDir.relativize(tempDir).getName(0));
469469
try {
470470
AtomicReference<Path> failed = new AtomicReference<>();
471471
Files.walkFileTree(

0 commit comments

Comments
 (0)