diff options
author | Björn Gustavsson <[email protected]> | 2015-11-18 10:07:08 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-11-18 10:10:28 +0100 |
commit | cd2f57bda32374dba98cbb0e72039a2e266f1633 (patch) | |
tree | 21464929d20a4748884ff2d088cbcda2afe42c81 /lib/stdlib | |
parent | 1993f0c858c2274c431c5f025c89e18d34282a8d (diff) | |
download | otp-cd2f57bda32374dba98cbb0e72039a2e266f1633.tar.gz otp-cd2f57bda32374dba98cbb0e72039a2e266f1633.tar.bz2 otp-cd2f57bda32374dba98cbb0e72039a2e266f1633.zip |
epp: Only flatten the original filename
There is no need to flatten filenames using file_name/1 every
time the current filename changes. Any filename obtained from
a source file will be already flattened. Only the original
source filename may need flattening.
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/src/epp.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl index 0d3f725afe..45f616bb02 100644 --- a/lib/stdlib/src/epp.erl +++ b/lib/stdlib/src/epp.erl @@ -543,7 +543,8 @@ init_server(Pid, Name, Options, St0) -> default_encoding=DefEncoding}, From = wait_request(St), Anno = erl_anno:new(AtLocation), - enter_file_reply(From, Name, Anno, AtLocation, code), + enter_file_reply(From, file_name(Name), Anno, + AtLocation, code), wait_req_scan(St); {error,E} -> epp_reply(Pid, {error,E}) @@ -678,7 +679,7 @@ enter_file_reply(From, Name, LocationAnno, AtLocation, Where) -> generated -> erl_anno:set_generated(true, Anno0) end, Rep = {ok, [{'-',Anno},{atom,Anno,file},{'(',Anno}, - {string,Anno,file_name(Name)},{',',Anno}, + {string,Anno,Name},{',',Anno}, {integer,Anno,get_line(LocationAnno)},{')',LocationAnno}, {dot,Anno}]}, epp_reply(From, Rep). |