mirror of
https://github.com/emqx/neuron.git
synced 2026-10-28 22:59:34 +08:00
Fix neu_persister_create to create adapters directory
This commit is contained in:
+12
-1
@@ -514,7 +514,18 @@ neu_persister_t *neu_persister_create(const char *dir_name)
|
||||
goto error;
|
||||
}
|
||||
|
||||
int n = path_cat(path, dir_len, sizeof(path), "adapters.json");
|
||||
int n = path_cat(path, dir_len, sizeof(path), "adapters");
|
||||
if (sizeof(path) == n) {
|
||||
log_error("path too long: %s", path);
|
||||
goto error;
|
||||
}
|
||||
rv = create_dir(path);
|
||||
if (rv != 0) {
|
||||
log_error("failed to create directory: %s", path);
|
||||
goto error;
|
||||
}
|
||||
|
||||
n = path_cat(path, dir_len, sizeof(path), "adapters.json");
|
||||
if (sizeof(path) == n) {
|
||||
log_error("path too long: %s", path);
|
||||
goto error;
|
||||
|
||||
Reference in New Issue
Block a user