dovecot-2.1: config: In "key=<path" path is now relative to conf...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Feb 2 13:12:25 EET 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/901ce18fbfcb
changeset: 14050:901ce18fbfcb
user: Timo Sirainen <tss at iki.fi>
date: Thu Feb 02 13:12:19 2012 +0200
description:
config: In "key=<path" path is now relative to config file's directory.
diffstat:
src/config/config-parser.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r 6734aa225b4f -r 901ce18fbfcb src/config/config-parser.c
--- a/src/config/config-parser.c Thu Feb 02 01:07:37 2012 +0200
+++ b/src/config/config-parser.c Thu Feb 02 13:12:19 2012 +0200
@@ -744,7 +744,7 @@
string_t *str = ctx->str;
const void *var_name, *var_value, *p;
enum setting_type var_type;
- const char *error;
+ const char *error, *path;
bool dump, expand_parent;
switch (type) {
@@ -758,10 +758,13 @@
} else {
if (!config_require_key(ctx, key)) {
/* don't even try to open the file */
- } else if (str_append_file(str, key, value, &error) < 0) {
- /* file reading failed */
- ctx->error = p_strdup(ctx->pool, error);
- return -1;
+ } else {
+ path = fix_relative_path(value, ctx->cur_input);
+ if (str_append_file(str, key, path, &error) < 0) {
+ /* file reading failed */
+ ctx->error = p_strdup(ctx->pool, error);
+ return -1;
+ }
}
}
break;
More information about the dovecot-cvs
mailing list