fix path not being constructed properly for shallow event storage

This commit is contained in:
Isaac Connor 2018-12-14 08:54:29 -05:00
parent 83e74aec55
commit 1a05e777c0
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ Event::Event(
Error("Can't mkdir %s: %s", path, strerror(errno)); Error("Can't mkdir %s: %s", path, strerror(errno));
} }
} else { } else {
snprintf(path, sizeof(path), "/%" PRIu64, id); path_ptr += snprintf(path_ptr, sizeof(path), "/%" PRIu64, id);
if ( mkdir(path, 0755) ) { if ( mkdir(path, 0755) ) {
if ( errno != EEXIST ) if ( errno != EEXIST )
Error("Can't mkdir %s: %s", path, strerror(errno)); Error("Can't mkdir %s: %s", path, strerror(errno));