/* Enable */
} else {
unlink(mod->path); // just in case!
+ hts_settings_makedirs(mod->path);
mod->sock = socket(AF_UNIX, SOCK_STREAM, 0);
assert(mod->sock);
/**
*
*/
-static int
-hts_settings_makedirs ( char *path )
+int
+hts_settings_makedirs ( const char *inpath )
{
size_t x;
struct stat st;
- size_t l = strlen(path);
+ char path[512];
+ size_t l = strlen(inpath);
+ strcpy(path, inpath);
for(x = 0; x < l; x++) {
if(path[x] == '/' && x != 0) {
path[x] = 0;
int hts_settings_open_file(int for_write, const char *pathfmt, ...);
+int hts_settings_makedirs ( const char *path );
+
#endif /* HTSSETTINGS_H__ */