mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Stop using realpath() in builtin_source, so as to preserve relative path
reporting in backtraces
This commit is contained in:
parent
5b24aac266
commit
ddb37a47da
1 changed files with 2 additions and 16 deletions
16
builtin.cpp
16
builtin.cpp
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue