fn_len = strlen(fn);
} else {
strlcpy(fn, merge_file, len_ptr ? *len_ptr + 1 : MAXPATHLEN);
- fn_len = clean_fname(fn, 1);
+ fn_len = clean_fname(fn, CFN_COLLAPSE_DOT_DOT_DIRS);
}
/* If the name isn't in buf yet, it's wasn't absolute. */
}
memcpy(buf, dirbuf + prefix_skip, dirbuf_len - prefix_skip);
memcpy(buf + dirbuf_len - prefix_skip, fn, fn_len + 1);
- fn_len = clean_fname(buf, 1);
+ fn_len = clean_fname(buf, CFN_COLLAPSE_DOT_DOT_DIRS);
}
if (len_ptr)
len = 0;
memcpy(dirbuf + len, dir, dirlen);
dirbuf[dirlen + len] = '\0';
- dirbuf_len = clean_fname(dirbuf, 1);
+ dirbuf_len = clean_fname(dirbuf, CFN_COLLAPSE_DOT_DOT_DIRS);
if (dirbuf_len > 1 && dirbuf[dirbuf_len-1] == '.'
&& dirbuf[dirbuf_len-2] == '/')
dirbuf_len -= 2;
else
pathjoin(buf, MAXPATHLEN, dirbuf, x);
- len = clean_fname(buf, 1);
+ len = clean_fname(buf, CFN_COLLAPSE_DOT_DOT_DIRS);
if (len != 1 && len < MAXPATHLEN-1) {
buf[len++] = '/';
buf[len] = '\0';
if (*fname != '-' || fname[1] || am_server) {
if (server_filter_list.head) {
strlcpy(line, fname, sizeof line);
- clean_fname(line, 1);
+ clean_fname(line, CFN_COLLAPSE_DOT_DOT_DIRS);
if (check_filter(&server_filter_list, line, 0) < 0)
fp = NULL;
else
out_of_memory("parse_arguments");
if (!*cp)
goto options_rejected;
- clean_fname(cp, 1);
+ clean_fname(cp, CFN_COLLAPSE_DOT_DOT_DIRS);
rej = check_filter(&server_filter_list, cp, 0) < 0;
free(cp);
if (rej)
if (tmpdir) {
if (!*tmpdir)
goto options_rejected;
- clean_fname(tmpdir, 1);
+ clean_fname(tmpdir, CFN_COLLAPSE_DOT_DOT_DIRS);
if (check_filter(elp, tmpdir, 1) < 0)
goto options_rejected;
}
if (backup_dir) {
if (!*backup_dir)
goto options_rejected;
- clean_fname(backup_dir, 1);
+ clean_fname(backup_dir, CFN_COLLAPSE_DOT_DOT_DIRS);
if (check_filter(elp, backup_dir, 1) < 0)
goto options_rejected;
}
}
if (partial_dir) {
if (*partial_dir)
- clean_fname(partial_dir, 1);
+ clean_fname(partial_dir, CFN_COLLAPSE_DOT_DOT_DIRS);
if (!*partial_dir || strcmp(partial_dir, ".") == 0)
partial_dir = NULL;
if (!partial_dir && refused_partial) {
if (server_filter_list.head) {
if (!*files_from)
goto options_rejected;
- clean_fname(files_from, 1);
+ clean_fname(files_from, CFN_COLLAPSE_DOT_DOT_DIRS);
if (check_filter(&server_filter_list, files_from, 0) < 0)
goto options_rejected;
}