a763ddf2ee0dfa9d36aacbbbbc6c68031fcbd238 max Fri Oct 10 14:37:38 2014 -0700 allow both alpha and beta binaries to run on gbib diff --git src/hg/lib/web.c src/hg/lib/web.c index ff2bc4b..a9d4ae9 100644 --- src/hg/lib/web.c +++ src/hg/lib/web.c @@ -1143,33 +1143,40 @@ struct dyString *linkWithTimestamp; char *scriptName = cgiScriptName(); if (scriptName == NULL) scriptName = cloneString(""); boolean nonVersionedLinks = FALSE; if (endsWith(scriptName, "qaPushQ")) nonVersionedLinks = TRUE; if (nonVersionedLinks) linkWithTimestamp = dyStringCreate("%s/%s%s", dyStringContents(fullDirName), baseName, extension); else if ((cfgOption("versionStamped") == NULL) && (hIsPreviewHost() || hIsPrivateHost())) linkWithTimestamp = dyStringCreate("%s/%s-%ld%s", dyStringContents(fullDirName), baseName, mtime, extension); else linkWithTimestamp = dyStringCreate("%s/%s-v%s%s", dyStringContents(fullDirName), baseName, CGI_VERSION, extension); +if (hIsBrowserbox() && !fileExists(dyStringContents(linkWithTimestamp))) + // on the browserbox, both alpha and beta binaries can run + { + linkWithTimestamp = dyStringCreate("%s/%s-%ld%s", dyStringContents(fullDirName), + baseName, mtime, extension); + } + if (!fileExists(dyStringContents(linkWithTimestamp))) - errAbort("Cannot find correct version of file '%s'; this is due to an installation error\n\nError details: %s does not exist", - fileName, dyStringContents(linkWithTimestamp)); + errAbort("Cannot find correct version of file '%s'; this is due to an installation " + "error\n\nError details: %s does not exist", fileName, dyStringContents(linkWithTimestamp)); // Free up all that extra memory dyStringFree(&realFileName); dyStringFree(&fullDirName); char *linkFull = dyStringCannibalize(&linkWithTimestamp); char *link = linkFull; if (docRoot != NULL) { link = cloneString(linkFull + strlen(docRoot) + 1); freeMem(linkFull); } if (wrapInHtml) // wrapped for christmas { struct dyString *wrapped = dyStringNew(0);