mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 23:55:52 +00:00
You might expect new FilePath(null, "/local/path").getChannel() to be null.
Confusingly, it is instead MasterComputer.localChannel! If that is fed back into FilePath.<init>(VirtualChannel,String) rather than using .<init>(FilePath,String) you get an object that behaves strangely and throws exceptions.
This commit is contained in:
1 parent
34a461eb40
commit
957595d2b4
1 file changed
+1
-1
@@ -196,7 +196,7 @@ public final class FilePath implements Serializable {
|
||||
* that's connected to that machine. If null, that means the local file path.
|
||||
*/
|
||||
public FilePath(VirtualChannel channel, String remote) {
|
||||
this.channel = channel;
|
||||
this.channel = channel == Jenkins.MasterComputer.localChannel ? null : channel;
|
||||
this.remote = normalize(remote);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user