Test filterPath for a null before preserving the setting. If user
cancels the FileDialog, it is not always set. #60
This commit is contained in:
parent
febe3d9f75
commit
bc931fdaa0
|
@ -1498,7 +1498,9 @@ public class DiskExplorerTab {
|
||||||
fileDialog.setFileName(Host.getFileName(disks[0].getFilename()));
|
fileDialog.setFileName(Host.getFileName(disks[0].getFilename()));
|
||||||
fileDialog.setText(textBundle.get("SaveDiskImageAsPrompt")); //$NON-NLS-1$
|
fileDialog.setText(textBundle.get("SaveDiskImageAsPrompt")); //$NON-NLS-1$
|
||||||
String fullpath = fileDialog.open();
|
String fullpath = fileDialog.open();
|
||||||
userPreferences.setSaveDirectory(fileDialog.getFilterPath());
|
if (fileDialog.getFilterPath() != null) {
|
||||||
|
userPreferences.setSaveDirectory(fileDialog.getFilterPath());
|
||||||
|
}
|
||||||
if (fullpath == null) {
|
if (fullpath == null) {
|
||||||
return; // user pressed cancel
|
return; // user pressed cancel
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue