- /* bounds check stuff */
- if (config_ui.flight_log_max() > data.log_limit()) {
- JOptionPane.showMessageDialog(owner,
- String.format("Requested flight log, %dk, is larger than the available space, %dk.\n",
- config_ui.flight_log_max(),
- data.log_limit()),
- "Maximum Flight Log Too Large",
- JOptionPane.ERROR_MESSAGE);
- return;
- }
+ try {
+ /* bounds check stuff */
+ if (config_ui.flight_log_max() > data.log_space()/1024) {
+ JOptionPane.showMessageDialog(owner,
+ String.format("Requested flight log, %dk, is larger than the available space, %dk.\n",
+ config_ui.flight_log_max(),
+ data.log_space()/1024),
+ "Maximum Flight Log Too Large",
+ JOptionPane.ERROR_MESSAGE);
+ return;
+ }