if (status != LTTNG_TRACE_CHUNK_STATUS_OK) {
ERR("Error removing subdirectory '%s' file when deleting chunk",
old_path);
- ret = -1;
goto end;
}
} else {
status = LTTNG_TRACE_CHUNK_STATUS_ERROR;
goto end;
}
- if (chunk->path[0] != '\0') {
+ if (chunk->path && chunk->path[0] != '\0') {
ret = lttng_directory_handle_create_subdirectory_as_user(
session_output_directory,
chunk->path,
return status;
}
-LTTNG_HIDDEN
+static
int lttng_trace_chunk_remove_subdirectory_recursive(struct lttng_trace_chunk *chunk,
const char *path)
{