917c0dcd5623fc858c2871418993dedc2745bb0f
max
  Tue Dec 5 04:28:27 2023 -0800
fixing dumbest possible bug thanks to code review, and thanks to chmalee, refs #32714

diff --git src/hg/hgGeneGraph/hgGeneGraph src/hg/hgGeneGraph/hgGeneGraph
index 090bd81..d779579 100755
--- src/hg/hgGeneGraph/hgGeneGraph
+++ src/hg/hgGeneGraph/hgGeneGraph
@@ -587,30 +587,31 @@
 def findDot():
     """ this would never be run on the RR but only on mirrors, because we specify it in hg.conf.
     It will try to find 'dot' and if it cannot find it, will fall back to cgi-bin/loader/dot_static:
 
         - if anything is specified in hg.conf, it will use that
         - if it can find "dot" in the PATH, it will use that next (dot
           installed from the repos will always work)
         - if that doesn't work either, we run cgi-bin/loader/dot_static (our
           static version may fail due to wrong glibc version) """
     binPath = cfgOption("graphvizPath")
 
     if binPath is not None and binPath.strip()!="":
         return binPath
 
     staticPath = join("loader", "dot_static")
+    if isfile(staticPath):
         return staticPath
 
     installedBin = which("dot")
     if installedBin is None:
         return None
     else:
         sys.stderr.write("Using graphviz binary %s\n" % installedBin)
         return installedBin
 
 def printDotErrorHelpAndExit():
     print("This often means that on this UCSC Genome Browser, GraphViz is not installed or is too old and ")
     print("that the supplied program dot_static also did not work. It can also mean that the configuration option")
     print("graphvizPath in hg.conf specifies a program that does not work.<p>")
     print("To resolve any of these problems, you will have to contact the system administrator of this Genome Browser server.<p>")
     print("To install GraphViz, ask the administrator of this server to run one of the following commands:<br>")