Skip to content

Commit

Permalink
Do not change the workspace root during polling.
Browse files Browse the repository at this point in the history
JENKINS-48434
  • Loading branch information
p4paul committed Feb 16, 2018
1 parent 46e2d35 commit 2ec2dcc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java
Expand Up @@ -355,15 +355,10 @@ private PollingResult pollWorkspace(EnvVars envVars, TaskListener listener, File
envVars.put("EXECUTOR_NUMBER", envVars.get("EXECUTOR_NUMBER", executor));

Workspace ws = (Workspace) workspace.clone();
String root = buildWorkspace.getRemote();
if (root.contains("@")) {
root = root.replace("@", "%40");
}
ws.setRootPath(root);
// JENKINS-48434 by setting rootPath to null will leave client's root unchanged
ws.setRootPath(null);
ws.setExpand(envVars);

// don't call setRootPath() here, polling is often on the master

// Set EXPANDED client
String client = ws.getFullName();
String syncID = ws.getSyncID();
Expand Down

0 comments on commit 2ec2dcc

Please sign in to comment.