Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
char *start, *end;
start = td->path + strlen(td->collection_path);
char *start, *end;
start = td->path + strlen(td->collection_path);
+ while (start[0] == '/')
+ start++; /* skip / */
end = strchr(start, '/');
if (!end)
end = strchr(start, '/');
if (!end)
+ end = start + strlen(start);
memcpy(td->domain, start, end - start);
td->domain[end - start] = '\0';
}
memcpy(td->domain, start, end - start);
td->domain[end - start] = '\0';
}
return;
memcpy(buf, td->path, PATH_MAX);
start = buf + strlen(td->collection_path);
return;
memcpy(buf, td->path, PATH_MAX);
start = buf + strlen(td->collection_path);
+ while (start[0] == '/')
+ start++; /* skip / */
start = strchr(start, '/'); /* get begin of domain content */
if (!start)
return;
start = strchr(start, '/'); /* get begin of domain content */
if (!start)
return;
+ while (start[0] == '/')
+ start++; /* skip / */
/* find last -, skips time */
end = strrchr(start, '-');
if (!end)
/* find last -, skips time */
end = strrchr(start, '-');
if (!end)
return;
memcpy(buf, td->path, PATH_MAX);
start = buf + strlen(td->collection_path);
return;
memcpy(buf, td->path, PATH_MAX);
start = buf + strlen(td->collection_path);
+ while (start[0] == '/')
+ start++; /* skip / */
start = strchr(start, '/'); /* get begin of domain content */
if (!start)
return;
start = strchr(start, '/'); /* get begin of domain content */
if (!start)
return;
+ while (start[0] == '/')
+ start++; /* skip / */
/* find last -, skips time */
end = strrchr(start, '-');
if (!end)
/* find last -, skips time */
end = strrchr(start, '-');
if (!end)