@Override
  protected void update(@NotNull FileChooserPanel panel, @NotNull AnActionEvent e) {
    var directory = panel.currentDirectory();
    e.getPresentation().setEnabled(directory != null && !directory.getFileSystem().isReadOnly());
  }
@Override
  protected void update(@NotNull FileChooserPanel panel, @NotNull AnActionEvent e)