2ce2d8e580349017c64d1bcf789dfe271e67f8d6
angie
  Wed Feb 8 11:27:41 2017 -0800
Don't allow '/' in download file name -- replace with '_'.  refs #18810

diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c
index 790dfb7..d5669e8 100644
--- src/hg/hgTables/hgTables.c
+++ src/hg/hgTables/hgTables.c
@@ -223,30 +223,32 @@
 if (script != NULL)
     return script;
 else
     return hgTablesName();
 }
 
 
 void textOpen()
 /* Start up page in text format. (No need to close this).
  *	In case of pipeline output to a compressor, it is closed
  *	at main() exit.
  */
 {
 hgBotDelayNoWarn();  // delay but suppress warning at 10-20 sec delay level because this is not html output.
 char *fileName = cartUsualString(cart, hgtaOutFileName, "");
+// Don't allow '/' in fileName -- textOutInit interprets that as indicating a local file on disk
+subChar(fileName, '/', '_');
 char *compressType = cartUsualString(cart, hgtaCompressType,
 				     textOutCompressNone);
 
 if (doGenomeSpace())
     {
     char hgsid[64];
     struct tempName tn;
     safef(hgsid, sizeof(hgsid), "%s", cartSessionId(cart));
     trashDirFile(&tn, "genomeSpace", hgsid, ".tmp");
     gsTemp = cloneString(tn.forCgi);
     fileName = gsTemp;
     }
 
 compressPipeline = textOutInit(fileName, compressType, &saveStdout);
 }