stick |mass outputs in mass subdirectory of put
**
*/
#include <uv.h>
+#include <sys/stat.h>
#include "all.h"
#include "vere/vere.h"
@@ -1868,7 +1869,14 @@ _raft_grab(u3_noun rus)
c3_c* wen_c = u3r_string(u3A->wen);
c3_c nam_c[2048];
- snprintf(nam_c, 2048, "%s/.urb/put/%s-mass.txt", u3_Host.dir_c, wen_c);
+ snprintf(nam_c, 2048, "%s/.urb/put/mass", u3_Host.dir_c);
+
+ struct stat st;
+ if ( -1 == stat(nam_c, &st) ) {
+ mkdir(nam_c, 0700);
+ }
+
+ snprintf(nam_c, 2048, "%s/%s.txt", nam_c, wen_c);
fil_u = fopen(nam_c, "w");
fprintf(fil_u, "%s\r\n", wen_c);
