#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
int len, flen, i;
int size;
char *db_file_name, *sp;
+ struct stat statbuf;
status = db_create (&dbase, NULL, 0);
if (status)
return NULL;
+ if ( (accessmask & DB_CREATE) && stat (db_dir, &statbuf) )
+ mkdir (db_dir, modemask);
+
len = strlen (db_dir);
flen = strlen (feature);
size = len + strlen (encoding) + flen * 3 + 4;
db_file_name[len] = '\0';
}
strcat (db_file_name, encoding);
+
+ if ( (accessmask & DB_CREATE) && stat (db_file_name, &statbuf) )
+ mkdir (db_file_name, modemask);
+
strcat (db_file_name, "/");
/* strcat (db_file_name, feature); */
sp = &db_file_name[strlen (db_file_name)];