Stop using realpath() in builtin_source, so as to preserve relative path

reporting in backtraces
This commit is contained in:
ridiculousfish 2013-12-15 16:43:22 -08:00
parent 5b24aac266
commit ddb37a47da

View file

@ -3011,10 +3011,7 @@ static int builtin_source(parser_t &parser, wchar_t ** argv)
argc = builtin_count_args(argv);
const wchar_t *fn;
const wchar_t *fn_intern;
const wchar_t *fn, *fn_intern;
if (argc < 2 || (wcscmp(argv[1], L"-") == 0))
{
@ -3047,19 +3044,8 @@ static int builtin_source(parser_t &parser, wchar_t ** argv)
return STATUS_BUILTIN_ERROR;
}
fn = wrealpath(argv[1], NULL);
if (!fn)
{
fn_intern = intern(argv[1]);
}
else
{
fn_intern = intern(fn);
free((void *)fn);
}
}
parser.push_block(new source_block_t(fn_intern));
reader_push_current_filename(fn_intern);