Skip to content

Commit

Permalink
Fix JENKINS-28357
Browse files Browse the repository at this point in the history
If template doesn't exist, try with extension added.
  • Loading branch information
Alex Earl committed May 15, 2015
1 parent 970c7e1 commit f72f226
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -104,7 +104,13 @@ protected InputStream getFileInputStream(String fileName, String extension)
"hudson/plugins/emailext/templates/" + fileName);

if (inputStream == null) {
final File templateFile = new File(scriptsFolder(), fileName);
File templateFile = new File(scriptsFolder(), fileName);

// the file may have an extension, but not the correct one
if(!templateFile.exists()) {
fileName += extension;
templateFile = new File(scriptsFolder(), fileName);
}
inputStream = new FileInputStream(templateFile);
}

Expand Down

0 comments on commit f72f226

Please sign in to comment.