Skip to content

Commit

Permalink
fixed issue with colon in export filename, causing issues on Windows. c…
Browse files Browse the repository at this point in the history
…lose #2698
  • Loading branch information
j-dimension committed Dec 2, 2024
1 parent 452407c commit 41459f7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ You should also get your employer (if you work as a programmer) or school,
package com.jdimension.jlawyer.client.editors.reporting;

import com.jdimension.jlawyer.client.utils.ComponentUtils;
import com.jdimension.jlawyer.client.utils.FileUtils;
import com.jdimension.jlawyer.client.utils.TableUtils;
import java.text.DecimalFormat;
import javax.swing.JOptionPane;
Expand Down Expand Up @@ -767,7 +768,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

private void cmdExportTableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdExportTableActionPerformed
try {
TableUtils.exportAndLaunch(this.resultTable.getTableName() + ".csv", this.tblResult, this.decFormat);
String fileName=FileUtils.sanitizeFileName(this.resultTable.getTableName() + ".csv");
TableUtils.exportAndLaunch(fileName, this.tblResult, this.decFormat);
} catch (Exception ex) {
log.error("Error exporting table to CSV", ex);
JOptionPane.showMessageDialog(this, "Fehler beim Export: " + ex.getMessage(), com.jdimension.jlawyer.client.utils.DesktopUtils.POPUP_TITLE_ERROR, JOptionPane.ERROR_MESSAGE);
Expand Down

0 comments on commit 41459f7

Please sign in to comment.