Skip to content

Commit

Permalink
0005441: Windows service won't start if tmp dir has trailing slash
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Sep 7, 2022
1 parent 59dd9c3 commit e51f51d
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -360,7 +360,11 @@ protected ArrayList<String> getWrapperCommand(String arg, boolean isQuotedArgume
ArrayList<String> cmd = new ArrayList<String>();
String quote = isQuotedArguments ? getWrapperCommandQuote() : "";
cmd.add(quote + config.getJavaCommand() + quote);
cmd.add("-Djava.io.tmpdir=" + quote + System.getProperty("java.io.tmpdir") + quote);
String tmpDir = System.getProperty("java.io.tmpdir");
if (tmpDir != null && tmpDir.endsWith("\\")) {
tmpDir = tmpDir.substring(0, tmpDir.length() - 1);
}
cmd.add("-Djava.io.tmpdir=" + quote + tmpDir + quote);
cmd.add("-jar");
cmd.add(quote + config.getWrapperJarPath() + quote);
cmd.add(arg);
Expand Down

0 comments on commit e51f51d

Please sign in to comment.