c65d1d60bacfcd3531bee6f3be302b5c30a131b1
hiram
  Wed Dec 14 11:17:38 2016 -0800
keep the day of year directory name to 3 digits refs #2811

diff --git src/hg/lib/trashDir.c src/hg/lib/trashDir.c
index 25e1e5f..38e41af 100644
--- src/hg/lib/trashDir.c
+++ src/hg/lib/trashDir.c
@@ -9,31 +9,31 @@
 #include "portable.h"
 #include "trashDir.h"
 
 static void trashDirFileExt(struct tempName *tn, char *dirName, char *base, char *suffix, boolean addDate)
 /*	obtain a trash file name trash/dirName/base*.suffix */
 {
 static struct hash *dirHash = NULL;
 char prefix[64];
 char buffer[4096];
 
 if (! dirHash)
 	dirHash = newHash(0);
 
 if (addDate)
     {
-    safef(buffer, sizeof buffer, "%s/%d", dirName, dayOfYear());
+    safef(buffer, sizeof buffer, "%s/%03d", dirName, dayOfYear());
     dirName = buffer;
     }
 
 /* already created this directory ? */
 if (! hashLookup(dirHash,dirName))
     {
     hashAddInt(dirHash, dirName, 1);	/* remember, been here, done that */
     mkdirTrashDirectory(dirName);
     }
 /* no need to duplicate the _ at the end of base, makeTempName is going
  *	to add _ to the given base, some CGIs pass "base_"
  */
 if (endsWith(base,"_"))
     {
     char *t = cloneString(base);