import javax.swing.JPanel;
import tim.prune.App;
-import tim.prune.Config;
import tim.prune.GenericFunction;
import tim.prune.I18nManager;
+import tim.prune.config.Config;
/**
* Class to provide the function to save the config settings
if (response == JFileChooser.APPROVE_OPTION)
{
File saveFile = chooser.getSelectedFile();
+ FileOutputStream outStream = null;
try
{
- Config.getAllConfig().store(new FileOutputStream(saveFile), "Prune config file");
+ outStream = new FileOutputStream(saveFile);
+ Config.getAllConfig().store(outStream, "Prune config file");
}
catch (IOException ioe) {
_app.showErrorMessageNoLookup(getNameKey(),
I18nManager.getText("error.save.failed") + " : " + ioe.getMessage());
}
+ finally {
+ try {outStream.close();} catch (Exception e) {}
+ }
}
_dialog.dispose();
_dialog = null;