mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 14:02:22 +00:00
avoid using ',' and '=' in a path name since various tools are often buggy in handling them.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4695 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
969d69b9dd
commit
856444d6fe
2 files changed
+13
-4
No files matched your search
@@ -70,17 +70,26 @@ public final class Combination extends TreeMap<String,String> implements Compara
|
||||
/**
|
||||
* Converts to the ID string representation:
|
||||
* <tt>axisName=value,axisName=value,...</tt>
|
||||
*
|
||||
* @param sep1
|
||||
* The separator between multiple axes.
|
||||
* @param sep2
|
||||
* The separator between axis name and value.
|
||||
*/
|
||||
public String toString() {
|
||||
public String toString(char sep1, char sep2) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (Map.Entry<String,String> e : entrySet()) {
|
||||
if(buf.length()>0) buf.append(',');
|
||||
buf.append(e.getKey()).append('=').append(e.getValue());
|
||||
if(buf.length()>0) buf.append(sep1);
|
||||
buf.append(e.getKey()).append(sep2).append(e.getValue());
|
||||
}
|
||||
if(buf.length()==0) buf.append("default"); // special case to avoid 0-length name.
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return toString(',','=');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse operation of {@link #toString()}.
|
||||
*/
|
||||
|
||||
@@ -85,7 +85,7 @@ public class MatrixConfiguration extends Project<MatrixConfiguration,MatrixRun>
|
||||
public FilePath getWorkspace() {
|
||||
Node node = getLastBuiltOn();
|
||||
if(node==null) node = Hudson.getInstance();
|
||||
return node.getWorkspaceFor(getParent()).child(getName());
|
||||
return node.getWorkspaceFor(getParent()).child(getCombination().toString('/','/'));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user