Skip to content

Commit

Permalink
Fix #14413.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Mar 28, 2023
1 parent 7b7b07d commit b473612
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ public void loadBundle() {
@Override
public NSView getAccessoryView(final NSAlert alert) {
final NSView view = super.getAccessoryView(alert);
String proposal = MessageFormat.format(PreferencesFactory.get().getProperty("browser.duplicate.format"),
final String proposal = MessageFormat.format(PreferencesFactory.get().getProperty("browser.duplicate.format"),
FilenameUtils.getBaseName(selected.getName()),
UserDateFormatterFactory.get().getShortFormat(System.currentTimeMillis(), false).replace(Path.DELIMITER, ':'),
UserDateFormatterFactory.get().getShortFormat(System.currentTimeMillis(), false)
.replace('/', '.')
.replace(':', '.'),
StringUtils.isNotBlank(selected.getExtension()) ? String.format(".%s", selected.getExtension()) : StringUtils.EMPTY);
this.updateField(inputField, proposal);
return view;
Expand Down

0 comments on commit b473612

Please sign in to comment.