edata->elevel = elevel;
edata->output_to_server = output_to_server;
edata->output_to_client = output_to_client;
- edata->filename = filename;
+ if (filename)
+ {
+ const char *slash;
+
+ /* keep only base name, useful especially for vpath builds */
+ slash = strrchr(filename, '/');
+ edata->filename = slash ? slash + 1 : filename;
+ }
edata->lineno = lineno;
edata->funcname = funcname;
/* the default text domain is the backend's */
}
edata = &errordata[errordata_stack_depth];
- edata->filename = filename;
+ if (filename)
+ {
+ const char *slash;
+
+ /* keep only base name, useful especially for vpath builds */
+ slash = strrchr(filename, '/');
+ edata->filename = slash ? slash + 1 : filename;
+ }
edata->lineno = lineno;
edata->funcname = funcname;
/* errno is saved now so that error parameter eval can't change it */