3b80c5be2a2d43f71277f8cd9274e3c49d9ad6c2 angie Mon Feb 24 16:54:33 2014 -0800 Improved error messages for bigData custom track common mistakes likemissing bigDataUrl setting or trying to upload a bigData file instead of making a track line with a public URL. I added a new "factory" to customFactory.c that produces no tracks, only error messages about directly uploaded bigData files. refs #12747 diff --git src/lib/linefile.c src/lib/linefile.c index 37197cf..2606ecb 100644 --- src/lib/linefile.c +++ src/lib/linefile.c @@ -16,31 +16,31 @@ #include "cheapcgi.h" #include "udc.h" char *getFileNameFromHdrSig(char *m) /* Check if header has signature of supported compression stream, and return a phoney filename for it, or NULL if no sig found. */ { char buf[20]; char *ext=NULL; if (startsWith("\x1f\x8b",m)) ext = "gz"; else if (startsWith("\x1f\x9d\x90",m)) ext = "Z"; else if (startsWith("BZ",m)) ext = "bz2"; else if (startsWith("PK\x03\x04",m)) ext = "zip"; if (ext==NULL) return NULL; -safef(buf, sizeof(buf), "somefile.%s", ext); +safef(buf, sizeof(buf), LF_BOGUS_FILE_PREFIX "%s", ext); return cloneString(buf); } static char **getDecompressor(char *fileName) /* if a file is compressed, return the command to decompress the * approriate format, otherwise return NULL */ { static char *GZ_READ[] = {"gzip", "-dc", NULL}; static char *Z_READ[] = {"gzip", "-dc", NULL}; static char *BZ2_READ[] = {"bzip2", "-dc", NULL}; static char *ZIP_READ[] = {"gzip", "-dc", NULL}; char **result = NULL; char *fileNameDecoded = cloneString(fileName); if (startsWith("http://" , fileName)