public static String getFullPathWithCommonPart()

in vault-server/src/jetbrains/buildServer/buildTriggers/vcs/vault/VaultUtil.java [80:91]


  public static String getFullPathWithCommonPart(@NotNull String path, @NotNull String targetPath) {
    targetPath = targetPath.replace('\\', '/');
    if (targetPath.endsWith("/")) {
      targetPath = targetPath.substring(0, targetPath.length() - 1);
    }
    if (targetPath.contains("/")) {
      targetPath = targetPath.substring(0, targetPath.lastIndexOf("/"));
    } else {
      targetPath = StringUtil.EMPTY;
    }
    return (targetPath.length() == 0 ? "" : targetPath + "/") + path;
  }