edd82b556567eda529c75a20dd73f9c27b151cbe
braney
  Fri Mar 22 10:48:38 2013 -0700
fix a problem that Hiram found where twoBitIsFile was errAborting if you gave it a directory name which is how netToAxt was calling it.
diff --git src/lib/osunix.c src/lib/osunix.c
index a5a4945..d18854d 100644
--- src/lib/osunix.c
+++ src/lib/osunix.c
@@ -627,15 +627,27 @@
 	{
 	warn("utime(%s) failed (ownership?)", fileName);
 	return FALSE;
 	}
     }
 else
     {
     FILE *f = fopen(fileName, "w");
     if (f == NULL)
 	return FALSE;
     else
 	carefulClose(&f);
     }
 return TRUE;
 }
+
+boolean isRegularFile(char *fileName)
+/* Return TRUE if fileName is a regular file. */
+{
+struct stat st;
+
+if (stat(fileName, &st) < 0)
+    return FALSE;
+if (S_ISREG(st.st_mode))
+    return TRUE;
+return FALSE;
+}