Index: src/hg/hgTracks/bigWigTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/bigWigTrack.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -B -U 4 -r1.5 -r1.6
--- src/hg/hgTracks/bigWigTrack.c	9 Feb 2009 19:11:52 -0000	1.5
+++ src/hg/hgTracks/bigWigTrack.c	24 Jun 2009 18:48:00 -0000	1.6
@@ -59,14 +59,9 @@
 if (tg->bbiFileName == NULL)
     {
     /* Figure out bigWig file name. */
     struct sqlConnection *conn = hAllocConn(database);
-    char query[256];
-    safef(query, sizeof(query), "select fileName from %s", tg->mapName);
-    char *wigFileName = sqlQuickString(conn, query);
-    if (wigFileName == NULL)
-	errAbort("Missing fileName in %s table", tg->mapName);
-    tg->bbiFileName = wigFileName;
+    tg->bbiFileName = bbiNameFromTable(conn, tg->mapName);
     hFreeConn(&conn);
     }
 }
 

