From 20b2a2086eed694e8f9b38824dbccd8c7dc03fc0 Mon Sep 17 00:00:00 2001 From: Stefan Spieker Date: Sun, 17 Nov 2024 22:20:40 +0100 Subject: [PATCH] use static field instead of hardcoded string (#1213) Co-authored-by: git-client-user --- .../java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java b/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java index 788c1fc378..5f38704bf5 100644 --- a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java +++ b/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java @@ -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.*; @@ -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);