Skip to content

Commit

Permalink
use static field instead of hardcoded string (#1213)
Browse files Browse the repository at this point in the history
Co-authored-by: git-client-user <git-client-user@example.com>
  • Loading branch information
StefanSpieker and git-client-user authored Nov 17, 2024
1 parent 8e6a9af commit 20b2a20
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import hudson.plugins.git.IGitAPI;
import hudson.plugins.git.IndexEntry;
import hudson.plugins.git.Revision;
import hudson.slaves.WorkspaceList;
import hudson.util.ArgumentListBuilder;
import hudson.util.Secret;
import java.io.*;
Expand Down Expand Up @@ -1978,7 +1979,8 @@ Path createTempFile(String prefix, String suffix) throws IOException {
if (workspace == null) {
return createTempFileInSystemDir(prefix, suffix);
}
File workspaceTmp = new File(workspace.getAbsolutePath() + "@tmp");

File workspaceTmp = new File(workspace.getAbsolutePath() + WorkspaceList.TMP_DIR_SUFFIX);
if (!workspaceTmp.isDirectory() && !workspaceTmp.mkdirs()) {
if (!workspaceTmp.isDirectory()) {
return createTempFileInSystemDir(prefix, suffix);
Expand Down

0 comments on commit 20b2a20

Please sign in to comment.