private static @NotNull String normalize(@NotNull String path) {
    String systemIndependentPathForm = FileUtil.toSystemIndependentName(path);
    if (systemIndependentPathForm.equals("/")) {
      return systemIndependentPathForm;
    }
    else {
      return StringUtil.trimEnd(systemIndependentPathForm, "/");
    }
  }
private static @NotNull String normalize(@NotNull String path)