Skip to content
Permalink
Browse files
Fix JENKINS-28357
If template doesn't exist, try with extension added.
  • Loading branch information
Alex Earl committed May 15, 2015
1 parent 970c7e1 commit f72f226f83ffe6f06e38de00829b1db6e093af61
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/java/hudson/plugins/emailext/plugins/content/AbstractEvalContent.java
@@ -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);
}

0 comments on commit f72f226

Please sign in to comment.