@Override
  public @Nullable Project createProject(String name, @NotNull String path) {
    Path baseDir = Path.of(path);
    LOG.assertTrue(Files.isDirectory(baseDir));

    List<Path> children;
    try (DirectoryStream<Path> childrenIterator = Files.newDirectoryStream(baseDir)) {
      children = ContainerUtil.collect(childrenIterator.iterator());
    }
    catch (IOException e) {
      throw new RuntimeException(e);
    }
    boolean isSomehowOverwriting = children.size() > 1 ||
                                   (children.size() == 1 && !PathMacroUtil.DIRECTORY_STORE_NAME.equals(children.get(0).getFileName().toString()));

    return ProgressManager.getInstance().run(new Task.WithResult<>(null, LangBundle.message("progress.title.applying.template"), true) {
      @Override
      public Project compute(@NotNull ProgressIndicator indicator) {
        try {
          myProjectMode = true;
          unzip(name, path, false, indicator, false);
          return ProjectManagerEx.getInstanceEx().loadProject(baseDir);
        }
        finally {
          cleanup();
          if (indicator.isCanceled() && !isSomehowOverwriting) {
            try {
              NioFiles.deleteRecursively(baseDir);
            }
            catch (IOException e) {
              LOG.error(e);
            }
          }
        }
      }
    });
  }
@Override
  public @Nullable Project createProject(String name, @NotNull String path)