Skip to content

Commit

Permalink
Merge branch 'JENKINS-43537'
Browse files Browse the repository at this point in the history
  • Loading branch information
daspilker committed Apr 15, 2017
2 parents 9be2fc5 + c543398 commit 72a6e57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/Home.md
Expand Up @@ -31,6 +31,8 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
* 1.61 (unreleased)
* Enhanced support for the [Join Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin)
([JENKINS-43219](https://issues.jenkins-ci.org/browse/JENKINS-43219))
* Fixed a problem with `readFileFromWorkspace`
([JENKINS-43537](https://issues.jenkins-ci.org/browse/JENKINS-43537))
* Do not print a warning when config file name equals config file identifier
([JENKINS-43345](https://issues.jenkins-ci.org/browse/JENKINS-43345))
* Support for the older versions of the [Join Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Join+Plugin) is
Expand Down
Expand Up @@ -263,14 +263,18 @@ public void queueJob(String path) throws NameNotProvidedException {

@Override
public InputStream streamFileInWorkspace(String relLocation) throws IOException, InterruptedException {
project.checkPermission(Item.WORKSPACE);
if (project != null) {
project.checkPermission(Item.WORKSPACE);
}
FilePath filePath = locateValidFileInWorkspace(workspace, relLocation);
return filePath.read();
}

@Override
public String readFileInWorkspace(String relLocation) throws IOException, InterruptedException {
project.checkPermission(Item.WORKSPACE);
if (project != null) {
project.checkPermission(Item.WORKSPACE);
}
FilePath filePath = locateValidFileInWorkspace(workspace, relLocation);
return filePath.readToString();
}
Expand Down

0 comments on commit 72a6e57

Please sign in to comment.