5b78e4d66b953e0d81f62057a943786c0ea862ac
angie
  Wed Mar 5 14:26:20 2014 -0800
Fixing an incomplete renaming of a variable that caused a compile errorfor a mirror admin using USE_BAM w/samtools but not using KNETFILE_HOOKS.
refs #12827

diff --git src/lib/bamFile.c src/lib/bamFile.c
index 3895332..fd226e1 100644
--- src/lib/bamFile.c
+++ src/lib/bamFile.c
@@ -13,45 +13,45 @@
  * and make sure the directory exists. */
 {
 static char *samDir = NULL;
 char *dirName = "samtools";
 if (samDir == NULL)
     {
     mkdirTrashDirectory(dirName);
     size_t len = strlen(trashDir()) + 1 + strlen(dirName) + 1;
     samDir = needMem(len);
     safef(samDir, len, "%s/%s", trashDir(), dirName);
     }
 return samDir;
 }
 #endif//ndef KNETFILE_HOOKS
 
-static bam_index_t *bamOpenIdx(char *bamFileName)
-/* If bamFileName has a valid accompanying .bai file, parse and return the index;
+static bam_index_t *bamOpenIdx(char *fileOrUrl)
+/* If fileOrUrl has a valid accompanying .bai file, parse and return the index;
  * otherwise return NULL. */
 {
 #ifndef KNETFILE_HOOKS
 // When file is an URL, this caches the index file in addition to validating:
 // Since samtools's url-handling code saves the .bai file to the current directory,
 // chdir to a trash directory before calling bam_index_load, then chdir back.
 char *runDir = getCurrentDir();
 char *samDir = getSamDir();
 boolean usingUrl = (strstr(fileOrUrl, "tp://") || strstr(fileOrUrl, "https://"));
 if (usingUrl)
     setCurrentDir(samDir);
 #endif//ndef KNETFILE_HOOKS
-bam_index_t *idx = bam_index_load(bamFileName);
+bam_index_t *idx = bam_index_load(fileOrUrl);
 #ifndef KNETFILE_HOOKS
 if (usingUrl)
     setCurrentDir(runDir);
 #endif//ndef KNETFILE_HOOKS
 return idx;
 }
 
 static void bamCloseIdx(bam_index_t **pIdx)
 /* Free unless already NULL. */
 {
 if (pIdx != NULL && *pIdx != NULL)
     {
     free(*pIdx); // Not freeMem, freez etc -- sam just uses malloc/calloc.
     *pIdx = NULL;
     }