Skip to content

Commit

Permalink
Do not append folder for explicit IBM temporary directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Mar 2, 2025
1 parent eed429e commit 0af7df6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,10 @@ public static VirtualMachine attach(String processId) throws IOException {
* @throws IOException If an IO exception occurs during establishing the connection.
*/
public static VirtualMachine attach(String processId, int timeout, Dispatcher dispatcher) throws IOException {
File directory = new File(System.getProperty(IBM_TEMPORARY_FOLDER, dispatcher.getTemporaryFolder(processId)), ".com_ibm_tools_attach");
String temporary = System.getProperty(IBM_TEMPORARY_FOLDER);
File directory = temporary == null
? new File(dispatcher.getTemporaryFolder(processId), ".com_ibm_tools_attach")
: new File(temporary);
long userId = dispatcher.userId();
RandomAccessFile attachLock = new RandomAccessFile(new File(directory, "_attachlock"), "rw");
try {
Expand Down

0 comments on commit 0af7df6

Please sign in to comment.