Skip to content

Commit

Permalink
fix: adds proper handling for relative tmp path
Browse files Browse the repository at this point in the history
  • Loading branch information
petethepig authored Oct 7, 2021
1 parent 82c6a09 commit a4dc654
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/src/main/java/io/pyroscope/javaagent/Profiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private static void deployLibrary() throws IOException {

try (final InputStream is = Objects.requireNonNull(
Profiler.class.getResourceAsStream("/" + fileName))) {
final Path target = Paths.get(targetDir.getPath(), targetLibraryFileName(fileName));
final Path target = targetDir.toPath().resolve(targetLibraryFileName(fileName)).toAbsolutePath();
Files.copy(is, target, StandardCopyOption.REPLACE_EXISTING);
libraryPath = target.toString();
}
Expand Down

0 comments on commit a4dc654

Please sign in to comment.