Make sure directory is created for trie data

master
teknomunk 2 years ago
parent 5cc08a251f
commit 3408ca78fe

@ -5,6 +5,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
struct edge {
char* label;
@ -275,6 +276,7 @@ bool ffdb_trie_set( const char* filename, const char* key, const char* value )
char* key_escaped = escape(key);
bool result = false;
mkdir( filename, 0755 );
root = load_root_node(filename);
if( !trie_entry_set( root, key_escaped, value ) ) {

Loading…
Cancel
Save