La comprobacion del path estaba hecha al reves :c

This commit is contained in:
Daniel Cortes
2019-01-19 16:55:27 -03:00
parent 0f3955ee34
commit 0d41e533c0
4 changed files with 93 additions and 118 deletions

View File

@@ -125,8 +125,8 @@ public class InformesController {
chooser.setFileFilter(new FileNameExtensionFilter("Excel 2007", "xls"));
if (chooser.showSaveDialog(this.view.getContentPanel()) == JFileChooser.APPROVE_OPTION) {
String filename = chooser.getSelectedFile().toString();
if (FileUtils.isValidPath(filename)) {
String filename = chooser.getSelectedFile().getPath();
if (!FileUtils.isValidPath(filename)) {
JOptionPane.showMessageDialog(this.view.getContentPanel(),"El archivo seleccionado no es valido","Archivo no valido", JOptionPane.ERROR_MESSAGE);
return null;
} else if (!filename.endsWith(".xls")) {