Skip to content

Commit

Permalink
Fix #228 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
hmiguim committed Jul 8, 2020
1 parent 9b8655f commit 18dc392
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.List;
import java.util.Map;

import com.databasepreservation.common.utils.FilenameUtils;
import org.apache.commons.lang3.StringUtils;

import com.databasepreservation.common.client.ViewerConstants;
Expand Down Expand Up @@ -63,9 +64,12 @@ public static List<String> getCellValues(ViewerRow row, TableStatus configTable,
if (columnConfig != null) {
final String applied = applyExportTemplate(row, configTable, columnConfig.getColumnIndex());
if (StringUtils.isNotBlank(applied)) {
values.add(applied);
if (columnConfig.getType().equals(ViewerType.dbTypes.BINARY)) {
values.add(FilenameUtils.sanitizeFilename(applied));
} else {
values.add(applied);
}
} else {
final String value = row.getCells().get(solrColumnName).getValue();
if (columnConfig.getType().equals(ViewerType.dbTypes.BINARY)) {
values.add(LobManagerUtils.getDefaultFilename(row.getUuid()));
} else {
Expand Down

0 comments on commit 18dc392

Please sign in to comment.