diff options
author | 2013-12-15 16:43:22 -0800 | |
---|---|---|
committer | 2013-12-15 16:43:22 -0800 | |
commit | ddb37a47da240a04ba2193ea3f29c1d12ad807c0 (patch) | |
tree | f25e1d11c7f82484e52b04a77ab513b0413f7f33 /builtin.cpp | |
parent | 5b24aac2660c27d27c9f3192821cd063fd07f9c0 (diff) |
Stop using realpath() in builtin_source, so as to preserve relative path
reporting in backtraces
Diffstat (limited to 'builtin.cpp')
-rw-r--r-- | builtin.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/builtin.cpp b/builtin.cpp index fe7b8377..f0e91838 100644 --- a/builtin.cpp +++ b/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,18 +3044,7 @@ 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); - } - + fn_intern = intern(argv[1]); } parser.push_block(new source_block_t(fn_intern)); |