File 2126-epp-Only-flatten-the-original-filename.patch of Package erlang

From cd2f57bda32374dba98cbb0e72039a2e266f1633 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Wed, 18 Nov 2015 10:07:08 +0100
Subject: [PATCH 6/6] 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.
---
 lib/stdlib/src/epp.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl
index 0d3f725..45f616b 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).
-- 
2.1.4

openSUSE Build Service is sponsored by