if (!file.getName().toUpperCase().endsWith(".PATCHLIB")) file = new File(file.getPath() + ".patchlib");
if (!file.getName().toLowerCase().endsWith(oFrame.getFileExtension())) file = new File(file.getPath() + oFrame.getFileExtension());
    private static File showSaveDialog() {	CompatibleFileDialog fc2 = new CompatibleFileDialog();        FileFilter type1 =	    new ExtensionFilter("PatchEdit Library Files (*.patchlib)",				".patchlib");        fc2.addChoosableFileFilter(type1);        fc2.setFileFilter(type1);        fc2.setCurrentDirectory(new File (AppConfig.getLibPath()));        if (fc2.showSaveDialog(PatchEdit.getInstance())	        != JFileChooser.APPROVE_OPTION)            return null;        File file = fc2.getSelectedFile();	if (!file.getName().toUpperCase().endsWith(".PATCHLIB"))	    file = new File(file.getPath() + ".patchlib");	if (file.isDirectory()) {	    ErrorMsg.reportError("Error", "Can not Save over a Directory");	    return null;	}	if (file.exists())	    if (JOptionPane.showConfirmDialog(null, "Are you sure?",		    "File Exists", JOptionPane.YES_NO_OPTION)		    == JOptionPane.NO_OPTION)		return null;	return file;    }