Skip to content

Commit

Permalink
fixed #930 - moved xls name check
Browse files Browse the repository at this point in the history
Was checking filename for xls prior to param replace
  • Loading branch information
nrichardson99 authored Sep 10, 2019
1 parent b6ec76b commit 57d3f38
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ private void processFiles(List<String> files, Message inputMessage,

for (String file : files) {
Map<String, Serializable> headers = new HashMap<>(1);
headers.put("source.file.path", file);
if ("xls".equals(FilenameUtils.getExtension(file))) {
oldExcelFormat = true;
}

InputStream inStream = null;
try {
info("Reading file: %s", file);
String filePath = resolveParamsAndHeaders(file, inputMessage);
if ("xls".equals(FilenameUtils.getExtension(filePath))) {
oldExcelFormat = true;
}
info("Reading file: %s", filePath);
headers.put("source.file.path", filePath);
inStream = directory.getInputStream(filePath, mustExist);
if (inStream != null) {
readWorkbook(headers, inStream, callback, oldExcelFormat);
Expand Down

0 comments on commit 57d3f38

Please sign in to comment.