2c8912b056f0460badfcad9cce2e5c0a8c290c6d
kent
  Tue Jan 12 18:06:55 2021 -0800
Refactoring code so that in both hubs and in built in tracks the same trackDb fields are D substituted for file names so they don't have to be maintained in parallel. Build a new trackSettingIsFile routine to enable this and am calling it in the two places that used to decide whether to do a substitution.

diff --git src/hg/inc/trackDb.h src/hg/inc/trackDb.h
index 8d79654..9acfd36 100644
--- src/hg/inc/trackDb.h
+++ src/hg/inc/trackDb.h
@@ -732,22 +732,27 @@
 void trackDbHubCloneTdbListToSharedMem(char *trackDbUrl, struct trackDb *list, unsigned long size, char *incFiles);
 /* For this hub, Allocate shared memory and clone trackDb list into it. incFiles has a list of include files that may be null. */
 
 void trackDbCloneTdbListToSharedMem(char *db, char *tdbPathString, struct trackDb *list, unsigned long size);
 /* For this native db, allocate shared memory and clone trackDb list into it. */
 
 struct trackDb *trackDbCache(char *db, char *tdbPathString, time_t time);
 /* Check to see if this db and trackDb table has a cached trackDb. */
 
 struct trackDb *trackDbHubCache(char *trackDbUrl, time_t time);
 /* Check to see if this hub has a cached trackDb. */
 
 boolean trackDbCacheOn();
 /* Check to see if we're caching trackDb contents. */
 
+boolean trackSettingIsFile(char *setting);
+/* Returns TRUE if setting found in trackDb stanza is a file setting that
+ * would benefit from directory $D substitution among other things - looks for
+ * settings that ends in "Url" and a few others. */
+
 char *labelAsFiltered(char *label);
 /* add text to label to indicate filter is active */
 
 char *labelAsFilteredNumber(char *label, unsigned number);
 /* add text to label to indicate filter is active */
 #endif /* TRACKDB_H */