diff --git a/parse-options.c b/parse-options.c
index 71a7acf4e22bd12c0919f277410d6ec52dd5efc8..fd08bb425c241a0861588ec0aedd15041095a95f 100644 (file)
--- a/parse-options.c
+++ b/parse-options.c
*(unsigned long *)(opt->value) = approxidate(arg);
return 0;
}
+
+/*
+ * This should really be OPTION_FILENAME type as a part of
+ * parse_options that take prefix to do this while parsing.
+ */
+extern const char *parse_options_fix_filename(const char *prefix, const char *file)
+{
+ if (!file || !prefix || is_absolute_path(file) || !strcmp("-", file))
+ return file;
+ return prefix_filename(prefix, strlen(prefix), file);
+}
+