- if (consumer->type == CONSUMER_DST_LOCAL) {
- /* Set application path to the destination path */
- ret = snprintf(pathname, PATH_MAX, "%s%s%s%s",
- consumer->dst.session_root_path,
- consumer->chunk_path,
- consumer->subdir, ua_sess->path);
- if (ret < 0) {
- PERROR("snprintf channel path");
- goto error;
- }
-
- /* Create directory. Ignore if exist. */
- ret = run_as_mkdir_recursive(pathname, S_IRWXU | S_IRWXG,
- ua_sess->euid, ua_sess->egid);
- if (ret < 0) {
- if (errno != EEXIST) {
- ERR("Trace directory creation error");
- goto error;
- }
- }
- } else {
- ret = snprintf(pathname, PATH_MAX, "%s%s%s%s",
+ if (consumer->type == CONSUMER_DST_NET &&
+ consumer->relay_major_version == 2 &&
+ consumer->relay_minor_version < 11) {
+ ret = snprintf(pathname, LTTNG_PATH_MAX, "%s%s/%s%s",