3d69928e215f730780d0166191cb1a6d794a760d
max
  Tue Feb 11 14:39:09 2014 -0800
making hgConvert gbib-ready, refs 11957
diff --git src/hg/lib/chromInfo.c src/hg/lib/chromInfo.c
index 2aff7ca..aed8555 100644
--- src/hg/lib/chromInfo.c
+++ src/hg/lib/chromInfo.c
@@ -138,37 +138,33 @@
 boolean exists = FALSE;
 
 /* if the database exists, check for the chromInfo file */
 if (sqlDatabaseExists(db))
     {
     sqlSafef(query, sizeof(query), "select fileName from chromInfo where chrom = '%s'", chrom);
     res = sqlQuickQuery(conn, query, seqFile, 512);
     sqlDisconnect(&conn);
     }
 
 /* if there is not table or no information in the table or if the table */
 /* exists but the file can not be opened return false, otherwise sequence */
 /* file exists and return true */
 if (res != NULL)
     {
-    /* chromInfo table exists so check that sequence file can be opened */
-    FILE *f = fopen(seqFile, "rb");
-    if (f != NULL)
-        {
-        exists = TRUE;
-        fclose(f);
-        }
+    char *seqFile2 = hReplaceGbdb(seqFile);
+    exists = udcExists(seqFile2);
+    freeMem(seqFile2);
     }
 return exists;
 }
 
 
 struct chromInfo *createChromInfoList(char *name, char *database)
 /* Load up chromosome information for chrom 'name'.
  * If name is NULL or "all" then load all chroms.
  * Similar to featureBits.c - could be moved to library */
 {
 struct sqlConnection *conn = hAllocConn(database);
 struct sqlResult *sr = NULL;
 char **row;
 int loaded=0;
 struct chromInfo *ret = NULL;