Skip to content

Commit 775ae4e

Browse files
author
Rob Petti
committed
[FIXED JENKINS-19519] support overrideable workspace separator
1 parent bd98df5 commit 775ae4e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/hudson/plugins/perforce/PerforceSCM.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ public class PerforceSCM extends SCM {
9898

9999
private static final int MAX_CHANGESETS_ON_FIRST_BUILD = 50;
100100

101+
private static final String WORKSPACE_COMBINATOR = System.getProperty(hudson.slaves.WorkspaceList.class.getName(),"@");
102+
101103
/**
102104
* Name of the p4 tool installation
103105
*/
@@ -1751,7 +1753,7 @@ public static String unescapeP4String(String string) {
17511753
private String getConcurrentClientName(FilePath workspace, String p4Client) {
17521754
if (workspace != null) {
17531755
// Match @ followed by an integer at the end of the workspace path
1754-
Pattern p = Pattern.compile(".*@(\\d+)$");
1756+
Pattern p = Pattern.compile(".*" + Pattern.quote(WORKSPACE_COMBINATOR) + "(\\d+)$");
17551757
Matcher matcher = p.matcher(workspace.getRemote());
17561758
if (matcher.find()) {
17571759
p4Client += "_" + matcher.group(1);

0 commit comments

Comments
 (0)