* fix file formatter

This commit is contained in:
Reinhard Pointner 2015-05-31 01:13:35 +00:00
parent a812f70ef3
commit e06e50418c
1 changed files with 2 additions and 1 deletions

View File

@ -142,7 +142,8 @@ public class RenamePanel extends JComponent {
// restore custom music formatter
renameModel.useFormatter(File.class, new ExpressionFormatter(persistentFileFormat.getValue(), new FileNameFormat(), File.class));
} catch (Exception e) {
// use default FileInfo formatter as fallback
// make sure to put File formatter at position 3
renameModel.useFormatter(File.class, new FileNameFormatter(renameModel.preserveExtension()));
} finally {
// use default filename formatter
renameModel.useFormatter(FileInfo.class, new FileNameFormatter(renameModel.preserveExtension()));