Menu

#58 Save cutpoints doesn't warn before overwriting files

open
nobody
None
5
2009-01-02
2009-01-02
Anonymous
No

The function saveList in net.sourceforge.dvb.projectx.gui.CollectionPanel
does not warn before overwriting files. The problem is aggravated by the fact that the same filechooser is used for adding input files to a collection. Under Gtk/Linux (Gtk Look and Feel) this will result in loss of the input file when you just hit OK in the "Save Cutpoints" dialog.

Fix:
add the following lines to saveList()

if ((new File(newfile)).fileExists() && javax.swing.JOptionPane.showConfirmDialog(this, "Overwrite existing file " + theFile + "?") != javax.swing.JOptionPane.YES_OPTION){
return;
}

Discussion


Log in to post a comment.